mirror of https://github.com/scrapy/scrapy.git
Fix a TypeError in example code from exceptions.rst (#4068)
This commit is contained in:
parent
da04fe0382
commit
06812f162e
|
|
@ -36,7 +36,7 @@ CloseSpider
|
|||
For example::
|
||||
|
||||
def parse_page(self, response):
|
||||
if 'Bandwidth exceeded' in response.body:
|
||||
if 'Bandwidth exceeded' in response.text:
|
||||
raise CloseSpider('bandwidth_exceeded')
|
||||
|
||||
DontCloseSpider
|
||||
|
|
|
|||
Loading…
Reference in New Issue