Comments (2)
开始测试、调试的时候有短暂被禁止访问过,后来采用了除去ip代理之外的常用方法,比如下载delay,用user-agent池,爬取了几万条,最长持续运行大概一两天的时间,也没有被封。
from dianping.
您好,为什么我运行爬取不到数据,报错
INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2018-05-21 09:11:59 [scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6023
2018-05-21 09:11:59 [scrapy.core.engine] ERROR: Error while obtaining start requests
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/scrapy/core/engine.py", line 127, in _next_request
request = next(slot.start_requests)
File "/Users/hhc/Downloads/dianping-master/dianping/spiders/dianpingspider.py", line 31, in start_requests
yield Request(url, headers=self.headers)
File "/Library/Python/2.7/site-packages/scrapy/http/request/init.py", line 39, in init
self.headers = Headers(headers or {}, encoding=encoding)
File "/Library/Python/2.7/site-packages/scrapy/http/headers.py", line 12, in init
super(Headers, self).init(seq)
File "/Library/Python/2.7/site-packages/scrapy/utils/datatypes.py", line 193, in init
self.update(seq)
File "/Library/Python/2.7/site-packages/scrapy/utils/datatypes.py", line 229, in update
super(CaselessDict, self).update(iseq)
File "/Library/Python/2.7/site-packages/scrapy/utils/datatypes.py", line 228, in
iseq = ((self.normkey(k), self.normvalue(v)) for k, v in seq)
ValueError: too many values to unpack
2018-05-21 09:11:59 [scrapy.core.engine] INFO: Closing spider (finished)
2018-05-21 09:11:59 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'finish_reason': 'finished',
'finish_time': datetime.datetime(2018, 5, 21, 1, 11, 59, 529582),
'log_count/DEBUG': 1,
'log_count/ERROR': 1,
'log_count/INFO': 7,
'memusage/max': 51367936,
'memusage/startup': 51367936,
'start_time': datetime.datetime(2018, 5, 21, 1, 11, 59, 521874)}
2018-05-21 09:11:59 [scrapy.core.engine] INFO: Spider closed (finished)
from dianping.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dianping.