How can I get the response from the Request in Scrapy?
python, scrapy
Solution
Is there a way to get the Response from a Request you just created? No, only the callback function has access to the Response. Once inside the callback you can access the Request via response.request, but not vise-versa.
Problem
Is there any way that I can get the `response.body` from the Request function in scrapy? I have this: ``` request = Request("http://www.example.com", callback = self.mytest) def mytest(self, response) return response.body ``` Now I want to get `response.body` in a Python variable, How can I get that? I want something like `myresponse = Request("http://www.example.com").get('response')`