mirror of https://github.com/scrapy/scrapy.git
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:
parent
13fab6e801
commit
66ba61c72f
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue