Skip to content

Instantly share code, notes, and snippets.

@nramirezuy
Created August 18, 2014 18:22
Show Gist options
  • Save nramirezuy/1bf4a6d635d98a1e4df0 to your computer and use it in GitHub Desktop.
Save nramirezuy/1bf4a6d635d98a1e4df0 to your computer and use it in GitHub Desktop.
def parse_category(self, response):
item = Item()
item['category'] = get_category(response)
for url in get_product_urls(response):
yield Request(url, callback=self.parse_product, meta={'item': item.copy()])
def parse_product(self, response):
item = response.meta.get('item', {})
...
return item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment