![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Mr_JR
这个作者很懒,什么都没留下…
展开
-
python3中url含有中文字符出现的问题及其解决方法解决方法
最近学习python3爬虫的过程中,遇到一个问题:当url中含有中文的时候,就会出现以下错误: self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1250, in _send_request self.p...原创 2018-06-29 17:26:21 · 2828 阅读 · 1 评论 -
scrapy+selenium爬去京东动态网页
使用scrapy爬取京东图书出现问题:京东中部分数据采用JS加载生成。造成后果:scrapy爬下来的网页缺乏一些信息(需要加载JS才能生成)如图1图1京东商品的价格不在网页源代码中。解决方法:1. 使用scrapy-splash。scrapy-splash可以帮助scrapy加载动态网页,下载地址 github提供来下载的方法与安装指导 由于感觉麻烦,没有使用...原创 2019-03-07 14:35:42 · 556 阅读 · 0 评论 -
splash + scrapy爬取动态网页
上次使用Selenium+scrapy爬取京东,但是效率真的很低,而且很慢,容易报错这次使用splash作为js引擎,加载动态网页1. 安装spalsh——我是ubbuntu系统,使用apt进行安装,并启动splashsudo apt install docker.io sudo docker pull scrapinghub/splashsudo docker run -it ...原创 2019-05-16 08:37:12 · 404 阅读 · 0 评论