{ "info": { "author": "MyKings", "author_email": "xsseroot@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "# pytld\n\nRefer to `http://mxr.mozilla.org/mozilla/source/netwerk/dns/src/effective_tld_names.dat?raw=1`. The top-level domain analysis of the URL or domain name.\n\n## Installation\n\n```bash\n$ pip install pytld\n```\n\n## Usage example\n\nIt can be from the URL or domain name analysis top-level domain:\n\n```python\nfrom pytld import get_tld\nfrom pytld import get_full_domain\nfrom pytld import get_hostname\n\n\ndef test_get_tld():\n assert get_tld('team.develop.google.hk.', strict=False) == 'develop.google.hk'\n assert get_tld('team.develop.google.hk.') == 'google.hk'\n assert get_tld('google.hk.') == 'google.hk'\n assert get_tld('http://www.example.com:8080/admin.php/afaf?13123') == 'example.com'\n assert get_tld('www.google.com') == 'google.com'\n assert get_tld('mail.google.com.hk') == 'google.com.hk'\n assert get_tld('apps.google.com.hk.') == 'google.com.hk'\n assert get_tld('blog.google.hk.') == 'google.hk'\n\n\ndef test_get_full_domain():\n assert get_full_domain('http://www.example.com.cn:8080/admin.php/afaf?13123') == 'www.example.com.cn'\n\n\ndef test_get_hostname():\n assert get_hostname('http://www.example.com.cn:8080/admin.php/afaf?13123') == 'www'\n\n```\n\n## License\n\nMPL 1.1/GPL 2.0/LGPL 2.1\n\n## Support\n\nFor any issues contact me at the e-mail given in the `Author` section.\n\n## Author\n\nmykings ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MyKings/pytld", "keywords": "tld,top level domain names,python", "license": "MPL 1.1/GPL 2.0/LGPL 2.1", "maintainer": null, "maintainer_email": null, "name": "pytld", "package_url": "https://pypi.org/project/pytld/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytld/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/MyKings/pytld" }, "release_url": "https://pypi.org/project/pytld/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Tld is obtained by url or full domain name", "version": "0.1.0" }, "last_serial": 2615952, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6b90b4c9d9242f148a0788291f4b7981", "sha256": "3b4f7dd5e29d62731a28074a6eda1f4a6c8a4850571755f0143603059202d176" }, "downloads": -1, "filename": "pytld-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6b90b4c9d9242f148a0788291f4b7981", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76291, "upload_time": "2017-02-03T04:51:12", "url": "https://files.pythonhosted.org/packages/c9/30/48e1897e028373b5d94a109bb22b3027193a1045cf9b7f178af4fb273fa7/pytld-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b90b4c9d9242f148a0788291f4b7981", "sha256": "3b4f7dd5e29d62731a28074a6eda1f4a6c8a4850571755f0143603059202d176" }, "downloads": -1, "filename": "pytld-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6b90b4c9d9242f148a0788291f4b7981", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76291, "upload_time": "2017-02-03T04:51:12", "url": "https://files.pythonhosted.org/packages/c9/30/48e1897e028373b5d94a109bb22b3027193a1045cf9b7f178af4fb273fa7/pytld-0.1.0.tar.gz" } ] }