Skip to content

Commit 66ba61c

Browse files
committed
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 ```
1 parent 13fab6e commit 66ba61c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/topics/shell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Here's an example of how you would call it from your spider::
186186
# We want to inspect one specific response.
187187
if ".org" in response.url:
188188
from scrapy.shell import inspect_response
189-
inspect_response(response)
189+
inspect_response(response, self)
190190

191191
# Rest of parsing code.
192192

0 commit comments

Comments
 (0)