mirror of https://github.com/scrapy/scrapy.git
small fix
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40286
This commit is contained in:
parent
a38c72bb05
commit
433f35b417
|
|
@ -25,7 +25,7 @@ class RedirectMiddleware(object):
|
|||
redirected.body = None
|
||||
# This is needed to avoid redirection loops with requests that contain dont_filter = True
|
||||
# Example (9 May 2008): http://www.55max.com/product/001_photography.asp?3233,0,0,0,Michael+Banks
|
||||
if isinstance(redirected.dont_filter, int):
|
||||
if isinstance(redirected.dont_filter, int) and redirected.dont_filter > 0:
|
||||
redirected.dont_filter -= 1
|
||||
else:
|
||||
redirected.dont_filter = False
|
||||
|
|
|
|||
Loading…
Reference in New Issue