modified: amazon/match_action.py

modified:   amazon/price_match.py
	modified:   config.py
This commit is contained in:
铭坤
2026-04-19 00:18:28 +08:00
parent 71b09a89de
commit f87c37528b
3 changed files with 56 additions and 17 deletions

View File

@@ -93,6 +93,7 @@ class AmzoneMatchAction(AmamzonBase):
num = 0
retry_num = 0
already_asin = set()
get_page_faild = 0
while retry_num < 3: # 最多重试3次
# if num > 3: #测试
@@ -117,9 +118,13 @@ class AmzoneMatchAction(AmamzonBase):
else:
total_page = 0
print(f"{self.mark_name}】当前页码: {current_page} / 总页数: {total_page}")
get_page_faild = 0
except Exception as e:
print(f"{self.mark_name}】获取页码失败", e)
get_page_faild+= 1
if get_page_faild > 2:
show_notification(f"{self.mark_name}】获取页码失败超3次停止任务")
break
sku_ls = self.tab.eles("xpath://div[@data-sku]",timeout=10)
print(f"{self.mark_name}】获取到 {len(sku_ls)}")