Skip to content

Commit 50da290

Browse files
authored
Update boss.py
1 parent 33f7ccf commit 50da290

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Boss直聘/BossJob/spiders/boss.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def parse(self, response):
2929
item['company_link'] = parse.urljoin('https://zhipin.com', node.css('.company-text > h3 a::attr(href)').extract_first("")) # 记住需要拼接url
3030

3131
yield item
32-
next_a = response.css('div.page > a.next::attr(href)').extract_first()
33-
print(next_a)
34-
if next_a != 'javascript:;':
35-
print("https://www.zhipin.com"+next_a)
36-
yield scrapy.Request("https://www.zhipin.com" + next_a, callback=self.parse)
32+
next_a = response.css('div.page > a.next::attr(href)').extract_first()
33+
print(next_a)
34+
if next_a != 'javascript:;':
35+
print("https://www.zhipin.com"+next_a)
36+
yield scrapy.Request("https://www.zhipin.com" + next_a, callback=self.parse)

0 commit comments

Comments
 (0)