From 66ba61c72f7f78e6af289636d6ed1fe18be049e7 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Tue, 2 Jun 2015 18:49:25 -0300 Subject: [PATCH] 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 ``` --- docs/topics/shell.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/shell.rst b/docs/topics/shell.rst index 37268c3ca..5c1cfbd47 100644 --- a/docs/topics/shell.rst +++ b/docs/topics/shell.rst @@ -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.