python3.x: No module named 'urllib2'

在python3.3裏面,用urllib.request代替urllib2python import urllib.request url = "http://www.baidu.com" response1 = urllib.request.urlopen(url) #打印請求的狀態碼 print(response1.getcode()) #打印請求的網頁內容的長度 print(len(res
相關文章
相關標籤/搜索