File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -121,16 +121,16 @@ class StackOverflowSpider(scrapy.Spider):
121
121
def parse_question(self, response):
122
122
yield {
123
123
'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],
126
126
'tags': response.css('.question .post-tag::text').extract(),
127
127
'link': response.url,
128
128
}
129
129
_EOF_
130
130
131
131
$ 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
134
134
>>> exit
135
135
```
136
136
You can’t perform that action at this time.
0 commit comments