fix: failure on uploading data

This commit is contained in:
2026-08-14 10:38:05 +08:00
parent 653d977da4
commit 36eac3ff28
+7 -2
View File
@@ -496,7 +496,9 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
while not flow.react(Wait, Sleep):
try:
span = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) span:nth-child(1)", wait=False)
err = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(5) .okki-space-item:nth-child(1) button", wait=False)
ok = locate(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) a", wait=False) if span.get_attribute('title') else None
break
except: pass
try: click(".product-import-img-footer button.mm-button__primary", wait=False)
@@ -509,8 +511,11 @@ def main(driver: WebDriver, logger = logging.getLogger('main')):
logger.warning('Incomplete import detected; downloading 1 related document')
flow.react(Sleep)
try: click(".mm-tbody table tbody tr:nth-child(1) td:nth-child(3) a")
except: continue
if ok is None:
logger.warning('Nothing to do; skipping')
continue
click(ok, condition=None)
flow.react(Sleep)
class Parse: