[Tutor] whois github package

Steven D'Aprano steve at pearwood.info
Sat Apr 25 16:13:39 CEST 2015


On Sat, Apr 25, 2015 at 09:46:26AM -0400, Juanald Reagan wrote:

>     from ipwhois import IPWhois
> 
>     obj = IPWhois(ipaddy)
>     results = [obj.lookup()]
>     print results [0]
> 
> This returns ALL the fields not just the "asn_registry" field. I looked for
> documentation on github but did not see anything. Any thoughts/comments are
> appreciated, thanks!

I don't have ipwhois installed, so I'm guessing, but try this:


obj = IPWhois(ipaddy)
results = obj.lookup()
print results.asn_registry

If that doesn't work, please copy and paste the entire traceback, and 
then run this and show us the result:

vars(results)




-- 
Steve


More information about the Tutor mailing list