我複製whcich使用這個庫,但是當我站上罰球線import urllib2
它給了我一個錯誤的例子:沒有名爲「的urllib2」模塊。 我搜索了下載的圖書館,但找不到。 任何人都可以幫助我? 謝謝。的Python的urllib2庫
2
A
回答
3
這是最有可能的,你正在使用Python 3
使用Python版本> 3,這些相關模塊的構成就像this:
Current Name Replacement Name
urllib2 urllib.request, urllib.error
urlparse urllib.parse
urllib urllib.parse, urllib.request, urllib.error [6]
robotparser urllib.robotparser
+0
謝謝!它現在有效 – user3371183
1
我猜你是使用Python 3,在Python 3 ,urllib2被重命名爲urllib。
更多信息Python urllib
相關問題
- 1. 是否有類似Python的urllib2的庫?
- 2. 與Python的urllib2
- 3. 關於Python的urllib2庫,HTTPHandler是什麼?
- 4. 的Python的urllib2 + Beautifulsoup
- 5. 的Python的urllib2與
- 6. Python的URLLib/URLLib2 POST
- 7. Python的 - 的urllib2和urllib的
- 8. 托爾+ urllib2的Python的
- 9. Python的認證與urllib2的
- 10. Python的urllib2的響應
- 11. 的Python - urllib2的超時
- 12. urllib2 python等效python
- 13. Python urllib2錯誤
- 14. python urllib2和unicode
- 15. Urllib2 Python錯誤
- 16. python csv linux urllib2
- 17. 使用urllib2 python
- 18. Python mod json + urllib2
- 19. urllib2.HTTPError Python
- 20. Python urllib2 force IPv4
- 21. Python - Heroku urllib2.HTTPError
- 22. Python,Urllib2和Openers
- 23. Python urllib2錯誤
- 24. python urllib2 return JSON
- 25. Python和urllib2的源接口
- 26. Python Urllib2與硒的Cookiejar
- 27. 處理urllib2的超時? - Python
- 28. 的Python urllib2.urlopen在URL
- 29. 在Python,urllib2的給錯誤
- 30. 便祕的Python urllib2插座
爲什麼Python版本? –