
爬虫
霞露
侠岚之名,意为守护。
展开
-
[Python] scrapy 爬虫报错: Connection to the other side was lost in a non-clean fashion: Connection lost.
scrapy 爬虫时报错:<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.><twisted.python.failure.f...原创 2019-03-21 14:36:08 · 6769 阅读 · 6 评论 -
[Python]selenium 爬虫报错:Message: stale element reference: element is not attached to the page document
selenium 爬虫时报错:Message: stale element reference: element is not attached to the page document过时的元素引用:元素未附加到页面文档错误原因:代码执行了click(),但是没有完成翻页,又爬了一次当前页,再执行翻页时页面已刷新,无法找到前面的翻页执行click()解决方法:click() 后设...原创 2019-03-24 20:03:23 · 14132 阅读 · 1 评论 -
[Python] python + selenium 抓取 京东商品数据(商品名称,售价,店铺,分类,订单信息,好评率,评论等)
目录一、环境二、简介三、京东网页分析1.获取商品信息入口--商品列表链接获取2.获取商品信息入口--商品详情链接获取3.商品详情获取4.商品评论获取四、代码实现五、运行结果六、结语一、环境 win10 + python 3.7 + pycharm64 + selenium二、简介 抓取京东商品页面信息:商品名称,...原创 2019-03-29 21:17:12 · 19243 阅读 · 16 评论 -
[Python] scrapy + selenium 抓取51job 职位信息(实现 传参 控制抓取 页数+职位名称+城市)
目录一、目标二、51job网页分析:1.网页构成观察2.网页分析三、代码实现1. 踩过的坑-----实现城市选择2.代码实现3.代码优化1)存放格式优化2)在爬虫中去掉\xa0\xa03)用normalize-space(节点)去掉\r\n\t4.pipelines.py 定义存储一、目标实现 通过传参(职位和地区)控制抓取51...原创 2019-04-21 20:01:43 · 3367 阅读 · 14 评论 -
[Python] selenium 爬虫报错:Message: 'chromedriver' executable needs to be in PATH.解决办法
selenium 爬虫时报错:Message: 'chromedriver' executable needs to be in PATH.Please see https://sites.google.com/a/chromium.org/chromedriver/home。报错原因:没有配置chrome浏览器的chromedriver解决办法:1.确定自己所用chrome的版本...原创 2019-08-28 21:55:44 · 37688 阅读 · 21 评论