import urllib.request
urllib.request.urlretrieve("http://www.baidu.com", "E:\\python_spider\\tmp\\test.html")
urllib.request.urlcleanup()
file=urllib.request.urlopen("https://read.douban.com/provider/all")
print(file.info())
print(file.getcode())
print(file.geturl())
网友评论