diff --git a/docs/topics/exceptions.rst b/docs/topics/exceptions.rst index 09cb8ed66..967fa8580 100644 --- a/docs/topics/exceptions.rst +++ b/docs/topics/exceptions.rst @@ -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