Why does pywhois return empty headers?

Question!

I am using pywhois module in Python to fetch the Whois headers for websites. While it runs fine for most of the websites, I am trying to understand why sites like google.com and few others come back with black headers. Does PyWhois work only with websites that are newly created after a certain date?



Answers

I think this has to do with all the spam big name websites get. When you run whois on google.com, you get a list of crap without any record details, and I think pywhois runs the system whois underneath and pipes the input into a parser. Since there aren't any details for the parser's regex to match successfully, it all turns out blank. If you do something like:

x = pywhois.whois('=google.com')
print x

You'll get a lot more info from all the spam jumbled into your results. I'm trying to figure out a workaround now as well. Looking at this question: http://superuser.com/questions/37954/how-to-use-command-line-whois-for-spam-infected-domains-like-apple-com I'm trying to figure out how to set some options for pywhois to run the equivalent of this: whois -h whois-servers.net google.com

Macbook:Sites yellotyellott$ whois google.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

GOOGLE.COM.ZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COM
GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM
GOOGLE.COM.ZOMBIED.AND.HACKED.BY.WWW.WEB-HACK.COM
GOOGLE.COM.ZNAET.PRODOMEN.COM
GOOGLE.COM.YUCEKIRBAC.COM
GOOGLE.COM.YUCEHOCA.COM
GOOGLE.COM.WORDT.DOOR.VEEL.WHTERS.GEBRUIKT.SERVERTJE.NET
GOOGLE.COM.VN
GOOGLE.COM.VABDAYOFF.COM
GOOGLE.COM.UY
GOOGLE.COM.UA
GOOGLE.COM.TW
GOOGLE.COM.TR
GOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COM
GOOGLE.COM.SPROSIUYANDEKSA.RU
GOOGLE.COM.SOUTHBEACHNEEDLEARTISTRY.COM
GOOGLE.COM.SHQIPERIA.COM
GOOGLE.COM.SERVES.PR0N.FOR.ALLIYAH.NET
GOOGLE.COM.SAYS.IWANNATSAHEYLUWITHNINAT.COM
GOOGLE.COM.SA
GOOGLE.COM.REJSCRAP.COM
GOOGLE.COM.PEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEENIS.COM
GOOGLE.COM.PE
GOOGLE.COM.PAVLINOFF-55-11-44.COM
GOOGLE.COM.MY
GOOGLE.COM.MX
GOOGLE.COM.LASERPIPE.COM
GOOGLE.COM.IS.NOT.HOSTED.BY.ACTIVEDOMAINDNS.NET
GOOGLE.COM.IS.HOSTED.ON.PROFITHOSTING.NET
GOOGLE.COM.IS.APPROVED.BY.NUMEA.COM
GOOGLE.COM.HK
GOOGLE.COM.HICHINA.COM
GOOGLE.COM.HAS.LESS.FREE.PORN.IN.ITS.SEARCH.ENGINE.THAN.SECZY.COM
GOOGLE.COM.ESJUEGOS.NET
GOOGLE.COM.DO
GOOGLE.COM.CO
GOOGLE.COM.CN
GOOGLE.COM.BR
GOOGLE.COM.BITERMANSOLUTIONS.COM
GOOGLE.COM.BEYONDWHOIS.COM
GOOGLE.COM.AU
GOOGLE.COM.AR
GOOGLE.COM.AFRICANBATS.ORG
GOOGLE.COM


This video can help you solving your question :)
By: admin