Thx for your advice.
This commit is contained in:
Randy Pen 2016-10-07 22:52:58 +08:00 committed by Paul Tremberth
parent eacc5937e4
commit c7d245b90b
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ this time for scraping author information::
def parse(self, response):
# follow links to author pages
for href in response.css('span a::attr(href)').extract():
for href in response.css('.author+a::attr(href)').extract():
yield scrapy.Request(response.urljoin(href),
callback=self.parse_author)