Skip to content Skip to sidebar Skip to footer

Scrapy: Effective Way To Test Inline Requests

I wrote a spider using scrapy-inline-requests library. So the parse method in my spider looks something like this: @inline_requests def parse(self, response1): item = MyItem()

Solution 1:

Might be a bit late but check out the tests in scrapy-inline-requests' github repo: https://github.com/rmax/scrapy-inline-requests/blob/master/tests/test_inline_requests.py.

Basically, feed the callback a list of Response objects in the order that your callback will yield Requests for these responses.

Post a Comment for "Scrapy: Effective Way To Test Inline Requests"