Make "xpath" and "css" Selector methods available on response #554
we'll be able to write this:
The latter variant is 2x shorter, and readability is still fine (I'd say it is improved).
In browser js document knows about css and xpath selectors, and they are doing just fine. The distinction between "response" and "document" is not very clear - document is the response js code works on. It doesn't provide raw http data though. But our TextResponse also doesn't work only on raw http data - it checks some headers an provides the decoded body.
Also check ItemLoader class - it can be initialized with either response or selector; this tells us Selector and Response already can act similar.
Implementation may involve renaming existing Response to something like RawResponse or HttpResponse, or adding
The text was updated successfully, but these errors were encountered:
Hmm, let's push further. If we remove the requirement to inherit from
No need to import scrapy at all
I'm scared about this path but worth looking into it as the api clearly low the barrier.