Python2中的urllib模塊,在Python3中被修改為
20.5. urllib.request — Extensible library for opening URLs 20.6. urllib.response — Response classes used by urllib 20.7. urllib.parse — Parse URLs into components 20.8. urllib.error — Exception classes raised by urllib.request 20.9. urllib.robotparser — Parser for robots.txt
這幾個模塊,常用的urllib.urlopen()方法變成了urllib.request.urlopen()方法,其它方法的改變,可以參考Python3的文檔
Python3文檔的互聯網協議與支持部分:http://docs.python.org/py3k/library/internet.html