mirror of https://github.com/scrapy/scrapy.git
fix example code
In the AuthorSpider, original css selector failed to get links of author pages
This commit is contained in:
parent
6df48d57e0
commit
eacc5937e4
|
|
@ -564,7 +564,7 @@ this time for scraping author information::
|
|||
|
||||
def parse(self, response):
|
||||
# follow links to author pages
|
||||
for href in response.css('.author a::attr(href)').extract():
|
||||
for href in response.css('span a::attr(href)').extract():
|
||||
yield scrapy.Request(response.urljoin(href),
|
||||
callback=self.parse_author)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue