python 爬虫 记录

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

 

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

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

  

posted @ 2017-02-24 12:33  顺风椰子皮  阅读(239)  评论(0编辑  收藏  举报