Scrapy, a fast high-level web crawling & scraping framework for Python.
[DOC][Overview] Use idiomatic .extract_first()
Paul Tremberth149c4cd41e28
diff --git a/docs/intro/overview.rst b/docs/intro/overview.rstindex 0673aed93..6c1291c1f 100644--- a/docs/intro/overview.rst+++ b/docs/intro/overview.rst@@ -36,9 +36,9 @@ voted questions on StackOverflow and scrapes some data from each page::def parse_question(self, response):yield {- 'title': response.css('h1 a::text').extract()[0],- 'votes': response.css('.question .vote-count-post::text').extract()[0],- '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(),'tags': response.css('.question .post-tag::text').extract(),'link': response.url,}