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::
|
For example::
|
||||||
|
|
||||||
def parse_page(self, response):
|
def parse_page(self, response):
|
||||||
if 'Bandwidth exceeded' in response.body:
|
if 'Bandwidth exceeded' in response.text:
|
||||||
raise CloseSpider('bandwidth_exceeded')
|
raise CloseSpider('bandwidth_exceeded')
|
||||||
|
|
||||||
DontCloseSpider
|
DontCloseSpider
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue