Created
August 18, 2014 18:22
-
-
Save nramirezuy/1bf4a6d635d98a1e4df0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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