Merge pull request #3445 from jfflisikowski/3097-item-urls-not-defined-in-example

[MRG+1] Updating debug example file (#3097)
This commit is contained in:
Daniel Graña 2018-10-16 19:51:32 -03:00 committed by GitHub
commit 06f2db7fd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -18,11 +18,13 @@ Consider the following scrapy spider below::
)
def parse(self, response):
# collect `item_urls`
# <processing code not shown>
# collect `item_urls`
for item_url in item_urls:
yield scrapy.Request(item_url, self.parse_item)
def parse_item(self, response):
# <processing code not shown>
item = MyItem()
# populate `item` fields
# and extract item_details_url