mirror of https://github.com/scrapy/scrapy.git
use better condition in example spider
This commit is contained in:
parent
511eb0d657
commit
de052bbd1d
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue