首页 > 技术文章 > python 爬虫 记录

BenAndWang 2017-02-24 12:33 原文

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

 

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

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

  

推荐阅读