No (that really doesn't belong in Pywikibot), but https://publicsuffix.org/ might be what you are looking for. There are also some Python libraries available that use that, such as https://pypi.python.org/pypi/publicsuffix/ , https://pypi.python.org/pypi/publicsuffixlist and https://pypi.python.org/pypi/dnspy/ .
On 16 August 2016 at 10:05, Bináris wikiposta@gmail.com wrote:
Do we have a function that returns known TLDs?
-- Bináris
pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot
No. I can imagine it would be quite useful. Here are some options:
https://pypi.python.org/pypi?%3Aaction=search&term=Tld&submit=search
Packages tld and tldextract both provide that, and more
https://github.com/john-kurkowski/tldextract/blob/master/tldextract/tldextra...
We could provide a wrapper method. Could you create a task in Phabricator. Adding how it wil, be used will be helpful.
On Tue, 16 Aug 2016 15:14 Bináris, wikiposta@gmail.com wrote:
Do we have a function that returns known TLDs?
-- Bináris _______________________________________________ pywikibot mailing list pywikibot@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot