"The reason why field defaults was removed from Scrapy is because there were many ways to implement default field values depending on the project with slightly different semantics..."
class DefaultValuesPipeline(object):
def process_item(self, item, spider):
item.setdefault('field1', 'value1')
item.setdefault('field2', 'value2')
# ...
return item
--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/scrapy-users/-/u-zLCpuO8KUJ.
To post to this group, send email to scrapy...@googlegroups.com.
To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scrapy-users?hl=en.