python3 爬虫需要安装:requests,beautifulsoup4,html5lib
带有中文的需要这样写,要不然就会出现乱码
html = response.content.decode("utf8") with open("a.html", 'w') as f: f.write(html)