Hi,

You can use the available built-in processors such as *Compose* or 
*MapCompose*. 
See this link : 
https://doc.scrapy.org/en/latest/topics/loaders.html#scrapy.loader.processors.Compose.

On Monday, 27 February 2017 16:27:48 UTC+5:30, Hatch wrote:
>
> I currently use output_processor TakeFirst(), and write 
> l.add_xpath('field', xpath), but when there are no matches I want my 
> returned dict to have 'field': None, not to be missing the 'field' key 
> altogether. How can I retain the 'field' key even if there is no xpath 
> match?
>

-- 
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 scrapy-users+unsubscr...@googlegroups.com.
To post to this group, send email to scrapy-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to