Hey,
use this: ''.join(response.xpath('your-selector').extract())
Regards.
Lhassan.
2015-01-09 23:57 GMT+00:00 Daniel Fockler <[email protected]>:
> Hi,
> I'm using an ItemLoader and scrapy keeps returning arrays instead of
> strings to the JSON output file, if I just use a simple selector and
> extract(), it returns a single string. Is there any way around this, to get
> strings instead of arrays with a single item?
>
> --
> 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.
>
--
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.