|
|
@@ -645,8 +645,7 @@ class YaoShiBangSnapshot:
|
|
|
|
|
|
if self.product in title and self.brand in title:
|
|
|
self.is_product_count = 0
|
|
|
- if self.is_product_count >= 20:
|
|
|
- return
|
|
|
+
|
|
|
|
|
|
dom_idx = list_idx - 1
|
|
|
image_ele = goods_wrappers[dom_idx]
|
|
|
@@ -659,6 +658,8 @@ class YaoShiBangSnapshot:
|
|
|
except Exception as e:
|
|
|
logger.exception("写入数据库失败: %s", e)
|
|
|
|
|
|
+ if self.is_product_count >= 20:
|
|
|
+ break
|
|
|
# 检测下一页
|
|
|
self.clear_listen_buffer()
|
|
|
next_button = self.driver.ele("xpath=//div[@class='condition']//div[@class='btn next']")
|