<divclass="children"><h1>Installing pythonwhois</h1><divclass="text"><ahref="index.html"><<backtoindex</a></div><divclass="text">To install pythonwhois, you need to have <spanclass="fixed">pip</span> installed. It's available on most distributions in a package named <spanclass="fixed">python-pip</span>.</div><divclass="text">The pythonwhois package includes the <spanclass="fixed">pwhois</span> tool.</div><h2>Installing it from scratch</h2><h7>Code:</h7><preclass="code">pip install pythonwhois</pre><h2>Updating from a previous version</h2><divclass="text">Make sure to read the <ahref="upgrade.html">upgrade notes</a> before updating to a new major pythonwhois version!</div><h7>Code:</h7><preclass="code">pip install --upgrade pythonwhois</pre></div>
<divclass="children"><h1>Installing pythonwhois</h1><divclass="text"><ahref="index.html"><<backtoindex</a></div><divclass="text">To install pythonwhois, you need to have <spanclass="fixed">pip</span> installed. It's available on most distributions in a package named <spanclass="fixed">python-pip</span>.</div><divclass="text">The pythonwhois package includes the <spanclass="fixed">pwhois</span> tool.</div><h2>Installing it from scratch</h2><h7>Code:</h7><preclass="code">pip install pythonwhois</pre><div class="text">If you are using Python 2.6 and get an ImportError about <spanclass="fixed">OrderedDict</span>, also do the following:</div><h7>Code:</h7><preclass="code">pip install ordereddict</pre><h2>Updating from a previous version</h2><divclass="text">Make sure to read the <ahref="upgrade.html">upgrade notes</a> before updating to a new major pythonwhois version!</div><h7>Code:</h7><preclass="code">pip install --upgrade pythonwhois</pre></div>
Retrieves the raw WHOIS data for the specified domain, and returns it as a list of responses (one element for each WHOIS server queried). This method will keep following redirects, until it ends up at the right server (and all responses it picks up in the meantime, will be included). Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found.
Retrieves the raw WHOIS data for the specified domain, and returns it as a list of responses (one element for each WHOIS server queried). This method will keep following redirects, until it ends up at the right server (and all responses it picks up in the meantime, will be included). Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found.
@ -170,6 +170,10 @@ To start using pythonwhois, use `import pythonwhois`.
server::
server::
**Optional.** The WHOIS server to query. When not specified, it will default to the appropriate WHOIS server for the TLD.
**Optional.** The WHOIS server to query. When not specified, it will default to the appropriate WHOIS server for the TLD.
rfc3490::
**Optional.** If set to `True` a given domain will be encoded through the **toASCII** method as documented in RFC3490 before its submission to the whois service. If the domain isn't given in unicode, the method will handle the decoding by itself.
^ pythonwhois.net.get_root_server(**domain**)
^ pythonwhois.net.get_root_server(**domain**)
Looks up the appropriate root server for a TLD, and returns it as a string. Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found.
Looks up the appropriate root server for a TLD, and returns it as a string. Raises `pythonwhois.shared.WhoisException` if no root server for the TLD could be found.