Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How get list of all valid tld ? #91

Open
mhf-ir opened this issue Jul 9, 2020 · 4 comments
Open

How get list of all valid tld ? #91

mhf-ir opened this issue Jul 9, 2020 · 4 comments

Comments

@mhf-ir
Copy link

mhf-ir commented Jul 9, 2020

import tld

# Desire output: ['de', 'com', 'co.uk']
print(tld.which_method()) // ?
@barseghyanartur
Copy link
Owner

That functionality is not available. However, you could parse the source files to extract that information. May I ask, why would you need a simple list of all tlds?

@mhf-ir
Copy link
Author

mhf-ir commented Jul 9, 2020

iana.org will show which who is server will answer for tld. I need to get list of valid tlds around the world and find the latest update for who is list. your repo use public suffix well, and so on I interest to use this repo as source of tld list.
I think it's will be great if available, for further usage.

@barseghyanartur
Copy link
Owner

@mhf-ir: Ah, ok, that's the only valid use case I could think of. It's really easy to implement. However, for public names only. I'll think about that.

@mylesbartlett72
Copy link

https://data.iana.org/TLD/tlds-alpha-by-domain.txt
Get the file from here, it contains the full list. You can ship a copy with your script as a fallback if no internet is available, or if functionality has been turned off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants