python快速使用Urllib爬取網頁

import urllib.request(先導入Urllib模塊) file=urllib.request.urlopen("http://www.baidu.com")(定義file變量,爬取百度網頁) data=file.read()         (讀取網頁全部內容) print(data) fhandle=open("E:/學習文件夾/python練習/2.html","wb")  (
相關文章
相關標籤/搜索