{"id":24834,"library":"whois","title":"Whois Domain","description":"Python library for retrieving WHOIS information of domains. Provides domain registration details like registrar, creation date, expiration date, and name servers. Supports a wide range of TLDs through embedded server configurations. Current version: 1.20260326.1, requires Python >=3.9. Active development with monthly releases.","status":"active","version":"1.20260326.1","language":"python","source_language":"en","source_url":"https://github.com/mboot-github/WhoisDomain/","tags":["whois","domain","dns","network","information"],"install":[{"cmd":"pip install whois","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"This is the only correct import.","symbol":"whois","correct":"import whois"}],"quickstart":{"code":"import whois\n\ndomain = whois.whois('example.com')\nprint(domain.text)","lang":"python","description":"Query WHOIS information for a domain."},"warnings":[{"fix":"Use 'import whois' then call 'whois.whois(domain)'.","message":"Import the library using 'import whois', not 'from whois import whois'. The module name and function name are the same, which can be confusing.","severity":"gotcha","affected_versions":"all"},{"fix":"Always access fields using dict-like or attribute access after checking the object type.","message":"The 'whois' function returns a simple object in older versions; newer versions return a more structured object. Avoid relying on attribute names without checking the actual response.","severity":"deprecated","affected_versions":">=1.20230906.1"},{"fix":"Add delays between queries (e.g., time.sleep(1)) or use a rotating proxy list.","message":"WHOIS servers often have rate limits. Making many queries in quick succession may result in temporary IP bans or incomplete results.","severity":"gotcha","affected_versions":"all"},{"fix":"If you rely on custom TLD handling, verify results for .uk domains.","message":"The 'tld' parameter behavior changed in 1.20240129.1. The library now handles some second-level domains for .uk differently.","severity":"breaking","affected_versions":">=1.20240129.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you installed the correct package: 'pip install whois'. Then use 'import whois' and call 'whois.whois(domain)'.","cause":"The library is imported but the import is wrong or the package is not installed correctly.","error":"AttributeError: module 'whois' has no attribute 'whois'"},{"fix":"Verify the domain exists and is registered. If the issue persists, try querying with a different server or update the library to the latest version.","cause":"The WHOIS server returned an unexpected format or the domain has no WHOIS record.","error":"whois.parser.PywhoisError: Failed to parse WHOIS response for <domain>"},{"fix":"Use 'import whois' and call 'whois.whois()', not 'whois()' directly.","cause":"Accidentally imported the function as 'from whois import whois' but later reassigned 'whois' to a string or other non-callable.","error":"TypeError: 'str' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}