使用python自带的库(urllib.requests)
import urllib.request
response = urllib.request.urlopen('http://www.baidu.com',timeout=1)
html = response.read().decode('utf-8')
print(html)
import urllib.request
response = urllib.request.urlopen('http://www.baidu.com',timeout=1)
html = response.read().decode('utf-8')
print(html)
本文标题:spider最小程序
本文链接:https://www.haomeiwen.com/subject/xtczeqtx.html
网友评论