modified: .env
modified: amazon/__pycache__/approve.cpython-39.pyc modified: amazon/__pycache__/detail_spider.cpython-39.pyc modified: amazon/__pycache__/price_match.cpython-39.pyc modified: amazon/approve.py modified: amazon/detail_spider.py modified: amazon/price_match.py modified: assets/convert.js modified: assets/dedupe.js modified: assets/delete-brand.js modified: assets/split.js modified: blueprints/__pycache__/admin.cpython-39.pyc modified: blueprints/__pycache__/brand.cpython-39.pyc modified: blueprints/__pycache__/main.cpython-39.pyc modified: blueprints/main.py modified: brand_spider/__pycache__/main.cpython-39.pyc modified: new_web_source/convert.html modified: new_web_source/dedupe.html modified: new_web_source/delete-brand.html modified: new_web_source/split.html modified: tool/__pycache__/devices.cpython-39.pyc
This commit is contained in:
@@ -475,7 +475,8 @@ class AmzoneApprove(AmamzonBase):
|
||||
retry_num = 0
|
||||
already_asin = set()
|
||||
now_page = None
|
||||
while retry_num < 3: # 最多重试3次
|
||||
max_retry_num = 5
|
||||
while retry_num < max_retry_num: # 最多重试3次
|
||||
# if num > 3: #测试
|
||||
# return
|
||||
# 等待加载完成
|
||||
@@ -505,8 +506,11 @@ class AmzoneApprove(AmamzonBase):
|
||||
sku_ls = self.tab.eles("xpath://div[@data-sku]",timeout=10)
|
||||
print(f"获取到 {len(sku_ls)}")
|
||||
if len(sku_ls) == 0:
|
||||
print(f"搜索不出SKU停止")
|
||||
break
|
||||
retry_num += 1
|
||||
print(f"没有获取到 ASIN 商品,重试{retry_num}/{max_retry_num}")
|
||||
self.tab.refresh()
|
||||
self.tab.wait.doc_loaded(raise_err=False, timeout=120)
|
||||
continue
|
||||
# for sku_ele in sku_ls[0:2]:
|
||||
for sku_ele in sku_ls[1:]:
|
||||
# solve_problem = sku_ele.eles('xpath:.//kat-link[@label="解决商品信息问题"]')
|
||||
|
||||
Reference in New Issue
Block a user