[英]Trying to use whois in python but getting file not found error in windows
我正在嘗試使用 whois 但收到此錯誤:
我還安裝了https://docs.microsoft.com/en-us/sysinternals/downloads/whois ,它在我的 cmd 中運行良好,但是當我嘗試使用 Z23EEEB4347BDD26BZFC6B7EE9A3B755DD 時,它會顯示上述錯誤。
我已經使用以下命令安裝了 python-whois 和 whois,但仍然出現相同的錯誤。
pip install python-whois
pip install whois
編輯: whois.whois() 不工作它顯示以下錯誤:
AttributeError:模塊“whois”沒有屬性“whois”
所以我改用 whois.query()
如果您已將 python-whois 正確安裝到 Python 運行時環境中,則例如:
import whois
wd = whois.whois('google.com')
然后,例如:
print(*wd['domain_name'])
Output:
GOOGLE.COM google.com
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.