Use call to `inspect_reponse()` that works on 0.24.x

Otherwise, when the spider is ejecuted from a standalone script as described in http://doc.scrapy.org/en/stable/topics/practices.html#run-scrapy-from-a-script it triggers an exception like this:
```
.../site-packages/scrapy/shell.py", line 131, in inspect_response
...
from scrapy.project import crawler
...
exceptions.ImportError: cannot import name crawler
```
This commit is contained in:
Ramiro Morales 2015-06-02 18:49:25 -03:00
parent 13fab6e801
commit 66ba61c72f
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ Here's an example of how you would call it from your spider::
# We want to inspect one specific response.
if ".org" in response.url:
from scrapy.shell import inspect_response
inspect_response(response)
inspect_response(response, self)
# Rest of parsing code.