I've got at spider that creates several items once the main item is
created, I simply create a new Item(), copy the original item into it, then
reset the values that are different. Add each item to a list, then yield
them in a loop.
#...item definitions above
prod2 = ScrapeItem()
for elem in product:
prod2[elem] = product[elem]
prod2['model'] = prod2['model'] + '1'
prod2['price'] = float(prod2['price']) * .75
prod2['type'] = 2
for p in [product, prod2]:
yield p
Hope that helps a little.
--
You received this message because you are subscribed to the Google Groups
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.