We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b3c72c commit 149c4cdCopy full SHA for 149c4cd
docs/intro/overview.rst
@@ -36,9 +36,9 @@ voted questions on StackOverflow and scrapes some data from each page::
36
37
def parse_question(self, response):
38
yield {
39
- 'title': response.css('h1 a::text').extract()[0],
40
- 'votes': response.css('.question .vote-count-post::text').extract()[0],
41
- 'body': response.css('.question .post-text').extract()[0],
+ 'title': response.css('h1 a::text').extract_first(),
+ 'votes': response.css('.question .vote-count-post::text').extract_first(),
+ 'body': response.css('.question .post-text').extract_first(),
42
'tags': response.css('.question .post-tag::text').extract(),
43
'link': response.url,
44
}
0 commit comments