This commit is contained in:
parent
26b2e9efab
commit
41e092becc
|
@ -85,12 +85,12 @@ class JdSpider(scrapy.Spider):
|
|||
# time.sleep(10)
|
||||
|
||||
if page>settings['COMMENT_MAX_PAGE']:
|
||||
print("评论抓取达到最大深度, %s, 页数: %d", product_id, page)
|
||||
print("评论抓取达到最大深度, %s, 页数: %d" % (product_id, page))
|
||||
else:
|
||||
yield Request(next_comment_url, self.parse_comment,
|
||||
meta={'product_id': product_id, 'page': page})
|
||||
else:
|
||||
print("评论抓取完成, %s, 页数: %d", product_id, page)
|
||||
print("评论抓取完成, %s, 页数: %d" % (product_id, page))
|
||||
|
||||
def parse(self, response):
|
||||
items = response.xpath('//div[@id="plist"]//li[@class="gl-item"]')
|
||||
|
|
Loading…
Reference in New Issue