This commit is contained in:
2025-11-26 09:15:27 +08:00
parent 4953c488e1
commit 1533100cb4
2 changed files with 23 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
# 0.1.7
- 修复自动bug
# 0.1.6
- 信息变为本地生成
# 0.1.5

View File

@@ -93,6 +93,13 @@ class Auto:
if bol:
logger.debug("ip被ban秒")
return False
bol = self.tab.ele(
't:div@text():ERR_TIMED_OUT', timeout=1)
if bol:
logger.debug("刷新网页")
self.tab.refresh()
self.tab.wait(1.5)
bol = self.tab.ele(
't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1)
if bol:
@@ -151,6 +158,13 @@ class Auto:
# self.tab.wait(1)
# return self.click_continue(bl=True)
bol = self.tab.ele(
't:div@text():ERR_TIMED_OUT', timeout=1)
if bol:
logger.debug("刷新网页")
self.tab.refresh()
self.tab.wait(1.5)
bol = self.tab.ele(
't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1)
if bol:
@@ -190,10 +204,10 @@ class Auto:
if 'https://veritaconnect.ca/canadianbreadsettlement/en-us/Claimant/UnknownClaimForm' in html:
logger.debug("成功进入问卷界面")
return True
jc += 1
except Exception as e:
logger.error(f"点击Continue按钮异常: {e}")
self.tab.wait(1)
return False
# 随机取城市
def get_random_city(self, province: str | None = None):
@@ -476,6 +490,12 @@ class Auto:
)
return True
bol = self.tab.ele(
't:div@text():ERR_TIMED_OUT', timeout=1)
if bol:
logger.debug("刷新网页")
self.tab.refresh()
self.tab.wait(1.5)
bol = self.tab.ele(
't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1)
if bol: