爬取代码如下:
# 一个循环中对一个url进行post请求时 只有一次爬取结果? for page in range(1, int(page_count) + 1): print 'page:', page self.crawl(self.comment_url, method = 'POST', data = {'type': 'all', 'currentPage': page, 'totalCount': product_detail_dict['comment_count'], 'placeId': '', 'productId': product_detail_dict['product_id'], 'placeIdType': '', 'isPicture': '', 'isBest': '', 'isPOI': 'Y', 'isELong': 'N'}, callback = self.comment_page, save = {'uuid': product_detail_dict['uuid']})
debug结果如下
循环做了3次,为什么只有一次爬取结果,是因为crawl同一个url吗?
url 相同