Skip to content

Commit 1d106f8

Browse files
committed
update scrapyd
1 parent 695c935 commit 1d106f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: scrapyd/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ class StackOverflowSpider(scrapy.Spider):
121121
def parse_question(self, response):
122122
yield {
123123
'title': response.css('h1 a::text').extract()[0],
124-
'votes': response.css('.question .vote-count-post::text').extract()[0],
125-
'body': response.css('.question .post-text').extract()[0],
124+
'votes': response.css('.question div[itemprop="upvoteCount"]::text').extract()[0],
125+
'body': response.css('.question .postcell').extract()[0],
126126
'tags': response.css('.question .post-tag::text').extract(),
127127
'link': response.url,
128128
}
129129
_EOF_
130130

131131
$ docker-compose run --rm scrapy
132-
>>> scrapy runspider stackoverflow_spider.py -o top-stackoverflow-questions.json
133-
>>> cat top-stackoverflow-questions.json
132+
>>> scrapy runspider stackoverflow_spider.py -o top-stackoverflow-questions.jl
133+
>>> cat top-stackoverflow-questions.jl
134134
>>> exit
135135
```
136136

0 commit comments

Comments
 (0)