use better condition in example spider

This commit is contained in:
Elias Dorneles 2016-09-15 16:56:13 -03:00
parent 1d159ae6f9
commit 75531e409e
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ http://quotes.toscrape.com, following the pagination::
}
next_page = response.css('li.next a::attr("href")').extract_first()
if next_page:
if next_page is not None:
next_page = response.urljoin(next_page)
yield scrapy.Request(next_page, callback=self.parse)