This commit is contained in:
2025-11-20 23:39:38 +08:00
parent 3052e65833
commit 229380f636
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# 0.0.9
- 修正cloudflare验证
# 0.0.8
- 修正api地址
# 0.0.7

View File

@@ -30,6 +30,11 @@ class Auto:
shadow2 = iframe.ele('x:/html/body').shadow_root
if shadow2:
logger.debug("找到Cloudflare iframe body shadow root")
status = shadow2.ele(
'x://span[text()="Verifying..."]', timeout=0.5)
if status:
tab.wait(3)
continue
status = shadow2.ele(
'x://span[text()="Success!"]', timeout=0.5)
if status:
@@ -71,6 +76,10 @@ class Auto:
else:
logger.debug("Cloudflare验证成功.")
self.tab.wait(1.5)
bol = self.tab.ele('t:h1@text():Sorry, you have been blocked', timeout=1)
if bol:
logger.debug("ip被ban秒")
return False
html = self.tab.url
logger.debug(f"当前URL: {html}")
if 'https://veritaconnect.ca/canadianbreadsettlement/en-us' == html: