打开py的IDLE
>>>import urllib.request
>>>a=urllib.request.urlopen("http://www.baidu.com")
>>>html=a.read().decode("utf-8")
>>>print(html)
结果:
打开py的IDLE
>>>import urllib.request
>>>a=urllib.request.urlopen("http://www.baidu.com")
>>>html=a.read().decode("utf-8")
>>>print(html)
结果: