Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Create a new Category to hold the scraped info. Also,
# prepare it for holding its brands.
category = items.Category(number="...", name="...", url="...", brands=[])
# Save the category into the tree structure.
self.sports["categories"].append(category)
# Create a request for the Category's page, which
# will list all its Brands.
# Pass the Category Item in the meta dict.
request = scrapy.Request(category["url"], callback=self.parse_category_page)
request.meta["category"] = category
yield request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.