为什么 pywhois 返回空标头?

发布于 2024-12-16 23:27:42 字数 128 浏览 1 评论 0原文

我正在 Python 中使用 pywhois 模块来获取网站的 Whois 标头。虽然它在大多数网站上运行良好,但我试图理解为什么像 google.com 和其他一些网站会返回黑色标题。 PyWhois 是否仅适用于特定日期之后新创建的网站?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人迟暮 2024-12-23 23:27:42

我认为这与知名网站收到的所有垃圾邮件有关。
当你在 google.com 上运行 whois 时,你会得到一个没有任何记录详细信息的垃圾列表,我认为 pywhois 运行下面的系统 whois 并将输入传输到解析器中。由于解析器的正则表达式没有任何详细信息可以成功匹配,因此一切都显示为空白。如果您执行以下操作:

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

您将从结果中混杂的所有垃圾邮件中获得更多信息。我现在也在想办法解决。看这个问题:
https://superuser. com/questions/37954/how-to-use-command-line-whois-for-spam-infected-domains-like-apple-com
我试图弄清楚如何为 pywhois 设置一些选项来运行与此等效的命令: 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

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:
https://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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文