ItemLoader: support non-TextResponse
See original GitHub issueAt the moment, ItemLoader(response=response)
fails if response
is not a TextResponse
instance.
Passing a binary response can still be useful, though. For example, to allow processors to access the response from their loader context, and hence be able to report the source URL (response.url
) when reporting input issues.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Item Loaders — Scrapy 2.7.1 documentation
Item Loaders are an extension of the itemloaders library that make it easier to work with Scrapy by adding support for responses.
Read more >Item Loader not working with response.meta - Stack Overflow
I want to load two items into an item loader, that is instantiated through the response.meta command. Somehow, the standard:
Read more >Demystifying Scrapy Item Loaders - Towards Data Science
In this article, we will define what an item loader is in comparison to Items. ... This is how ItemLoaders gets the data...
Read more >Item Loaders in Scrapy - YouTube
Item loaders can help you keep the spiders clean. Item loaders use input processors and output processors to clean up and process each...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GeorgeA92 You are testing the upstream
ItemLoader
, Scrapy subclasses it to make some Scrapy-specific adjustments:@calicomills That avoids the exception, but prevents the
response
from being available from a loader context, so it does not really solve the root issue.Thar’s great! No need to ask for permission 🙂