python 爬虫 记录

python3 爬虫需要安装:requests,beautifulsoup4,html5lib

带有中文的需要这样写,要不然就会出现乱码

html = response.content.decode("utf8")
with open("a.html", 'w') as f:
        f.write(html)

  

原文地址:https://www.cnblogs.com/BenAndWang/p/6438044.html