使用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)