mirror of https://github.com/scrapy/scrapy.git
Correct login request example
In the example log is not imported and not found in the global name space
This commit is contained in:
parent
40fbeb30e7
commit
178440a39a
|
|
@ -367,7 +367,7 @@ method for this job. Here's an example spider which uses it::
|
|||
def after_login(self, response):
|
||||
# check login succeed before going on
|
||||
if "authentication failed" in response.body:
|
||||
self.log("Login failed", level=log.ERROR)
|
||||
self.log("Login failed", level=scrapy.log.ERROR)
|
||||
return
|
||||
|
||||
# continue scraping with authenticated session...
|
||||
|
|
|
|||
Loading…
Reference in New Issue