爬虫
吃胡建人的小黑
爬虫在学生,可以相互交流
展开
-
python 爬虫出现乱码解决办法
第一步,先print(response.encoding),看网页返回的字符集类型得到网页的字符集类型后(假设字符集类型是ISO-8859-1),encode decode两个步骤text = response.text.encode('ISO-8859-1').decode('utf8')两个步骤即可解决...原创 2020-08-16 10:38:50 · 334 阅读 · 0 评论 -
crontab+scrapy+linux普通用户实现定时爬虫
crontab+scrapy+linux普通用户实现定时爬虫第一步:创建一个可执行的linux脚本,后缀为.shvim /home/luochuangjie/test.sh(你自己的工作路径)第二步:在test.sh里边编写脚本命令#run spider/home/luochuangjie/anaconda3/bin/python3 /home/luochuangjie/test.py ...原创 2019-08-06 15:50:53 · 198 阅读 · 0 评论