tldextract icon indicating copy to clipboard operation
tldextract copied to clipboard

Request: Could scheme be made available?

Open JeffreyShran opened this issue 5 years ago • 2 comments

Hi,

I'm aware of https://github.com/john-kurkowski/tldextract/issues/6 which asked for some urlparse functionality. This isn't that. It's simply a request to include access to the scheme as part of the standard output.

So instead of:

tldextract.extract('https://blogs.google.com')
# ExtractResult(subdomain='blogs', domain='google', tld='com')

Do this instead:

tldextract.extract('https://blogs.google.com')
# ExtractResult(scheme='https', subdomain='blogs', domain='google', tld='com')

JeffreyShran avatar Jul 28 '20 12:07 JeffreyShran

Possible. We're already parsing the scheme. We're considering moving away from namedtuple, to track additional metadata, like in #138. If we make that break, then adding the scheme wouldn't break this library's expected, ordered triple of (subdomain, domain, tld).

john-kurkowski avatar Aug 04 '20 17:08 john-kurkowski

Thanks @john-kurkowski.

Yes, if you could please keep in the back of your mind that would be great.

JeffreyShran avatar Aug 05 '20 13:08 JeffreyShran

https://github.com/john-kurkowski/tldextract/issues/272#issuecomment-1267491864

john-kurkowski avatar Dec 17 '22 06:12 john-kurkowski