def parse(self, response):
"""Get the pagination links and hand them off.
"""
s = Selector(response)
pagination = s.css('.pagination')
pagelinks = [response.url]
pagelinks.extend(pagination.xpath(
'//a[contains(@href, "l-remote/p-")]/@href').extract())
# for pagelink in pagelinks:
for pagelink in pagelinks[:1]:
request = Request(
urljoin(self.root, pagelink),
callback=self.parse_jobspage,
dont_filter=True,
)
yield request
评论列表
文章目录