回复:Scrapy tutorial not working (for me)

27 views
Skip to first unread message

xing...@163.com

unread,
Jul 10, 2015, 11:11:06 AM7/10/15
to scrapy...@googlegroups.com

Because: "2015-07-07 21:51:59 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)"

make sure you copied correctly, and the item you crawled still can be found in url.


发自我的小米手机

在 Shashwat Suman <shashwa...@sokrati.com>,2015-7-8 上午12:30写道:

The tutorial is here

I have copied the code as is and ran the program.
The output in stackoverflow-questions.json is just a '['

Here is the scrapy output

===

shashwat.suman@shashwat-laptop:~/Desktop/ProWebscrapper$ scrapy runspider stackoverflow_spider.py -o top-stackoverflow-questions.json 
2015-07-07 21:51:59 [scrapy] INFO: Scrapy 1.0.0.post2+g5303c66 started (bot: scrapybot)
2015-07-07 21:51:59 [scrapy] INFO: Optional features available: ssl, http11
2015-07-07 21:51:59 [scrapy] INFO: Overridden settings: {'FEED_FORMAT': 'json', 'FEED_URI': 'top-stackoverflow-questions.json'}
yoyo1
yoyo
2015-07-07 21:51:59 [scrapy] INFO: Enabled extensions: CloseSpider, FeedExporter, TelnetConsole, LogStats, CoreStats, SpiderState
2015-07-07 21:51:59 [scrapy] INFO: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, MetaRefreshMiddleware, HttpCompressionMiddleware, RedirectMiddleware, CookiesMiddleware, ChunkedTransferMiddleware, DownloaderStats
2015-07-07 21:51:59 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware
2015-07-07 21:51:59 [scrapy] INFO: Enabled item pipelines: 
2015-07-07 21:51:59 [scrapy] INFO: Spider opened
2015-07-07 21:51:59 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2015-07-07 21:51:59 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6023
2015-07-07 21:52:02 [scrapy] DEBUG: Crawled (200) <GET http://stackoverflow.com/questions?sort=votes> (referer: None)
yoyo2
2015-07-07 21:52:02 [scrapy] INFO: Closing spider (finished)
2015-07-07 21:52:02 [scrapy] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 250,
 'downloader/request_count': 1,
 'downloader/request_method_count/GET': 1,
 'downloader/response_bytes': 29432,
 'downloader/response_count': 1,
 'downloader/response_status_count/200': 1,
 'finish_reason': 'finished',
 'finish_time': datetime.datetime(2015, 7, 7, 16, 22, 2, 371020),
 'log_count/DEBUG': 2,
 'log_count/INFO': 7,
 'response_received_count': 1,
 'scheduler/dequeued': 1,
 'scheduler/dequeued/memory': 1,
 'scheduler/enqueued': 1,
 'scheduler/enqueued/memory': 1,
 'start_time': datetime.datetime(2015, 7, 7, 16, 21, 59, 613620)}
2015-07-07 21:52:02 [scrapy] INFO: Spider closed (finished)

===

I have python 2.7.9 installed.

--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scrapy-users...@googlegroups.com.
To post to this group, send email to scrapy...@googlegroups.com.
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

xing...@163.com

unread,
Jul 10, 2015, 11:15:08 AM7/10/15
to scrapy...@googlegroups.com

Maybe you will get the correct result, when running it the second time

发自我的小米手机

xing...@163.com xing...@163.com,2015-7-10 下午11:09写道:
Reply all
Reply to author
Forward
0 new messages