以豆瓣网为例:
from urllib import request resp = request.urlopen("https://book.douban.com/chart?subcat=I") html_data = resp.read().decode('utf-8') print(html_data)