3 ms·
Small plug for a random python tool I maintain that uses this. Parsing domains is a pain in the ass. It can be impossible to know what is part of tld, what is
by theelous3 5y ago
Small plug for a random python tool I maintain that uses this.
Parsing domains is a pain in the ass. It can be impossible to know what is part of tld, what is a subdomain etc without a canonical list and parser.
Here's a sansio domain / tld splitter: https://github.com/theelous3/sansio-tld-parser https://github.com/theelous3/sansio-tld-parser
Usecase: you want to block all edu domains - but tlds like wa.edu.au exists - gotta parse it out.
- austinjp 5y agoNice. One suggestion, your README.md references the GitHub-hosted list, but in that list itself it says: > Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat, rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. I'd submit a pull request but I'm on mobile. Also, is "sansio" a commonly-used phrase? I've not seen it before. I appreciate that it means "without i/o", I've just never seen it written like that before. Not even by a French person :)