Skip to content

Instantly share code, notes, and snippets.

@dogweather
Created March 16, 2019 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogweather/aa226fd799686aad096874108b3fbacf to your computer and use it in GitHub Desktop.
Save dogweather/aa226fd799686aad096874108b3fbacf to your computer and use it in GitHub Desktop.
# Pull the category back out of the meta dict.
parent_category = response.meta["category"]
# Create a new items.Brand with the scraped data.
# ...
# Add the new brand to its parent in the tree.
parent_category["brands"].append(brand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment