为什么 pywhois 返回空标头?
我正在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这与知名网站收到的所有垃圾邮件有关。
当你在 google.com 上运行 whois 时,你会得到一个没有任何记录详细信息的垃圾列表,我认为 pywhois 运行下面的系统 whois 并将输入传输到解析器中。由于解析器的正则表达式没有任何详细信息可以成功匹配,因此一切都显示为空白。如果您执行以下操作:
您将从结果中混杂的所有垃圾邮件中获得更多信息。我现在也在想办法解决。看这个问题:
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
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:
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