0.0.9
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
# 0.0.9
|
||||||
|
- 修正cloudflare验证
|
||||||
# 0.0.8
|
# 0.0.8
|
||||||
- 修正api地址
|
- 修正api地址
|
||||||
# 0.0.7
|
# 0.0.7
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ class Auto:
|
|||||||
shadow2 = iframe.ele('x:/html/body').shadow_root
|
shadow2 = iframe.ele('x:/html/body').shadow_root
|
||||||
if shadow2:
|
if shadow2:
|
||||||
logger.debug("找到Cloudflare iframe body shadow root")
|
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(
|
status = shadow2.ele(
|
||||||
'x://span[text()="Success!"]', timeout=0.5)
|
'x://span[text()="Success!"]', timeout=0.5)
|
||||||
if status:
|
if status:
|
||||||
@@ -71,6 +76,10 @@ class Auto:
|
|||||||
else:
|
else:
|
||||||
logger.debug("Cloudflare验证成功.")
|
logger.debug("Cloudflare验证成功.")
|
||||||
self.tab.wait(1.5)
|
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
|
html = self.tab.url
|
||||||
logger.debug(f"当前URL: {html}")
|
logger.debug(f"当前URL: {html}")
|
||||||
if 'https://veritaconnect.ca/canadianbreadsettlement/en-us' == html:
|
if 'https://veritaconnect.ca/canadianbreadsettlement/en-us' == html:
|
||||||
|
|||||||
Reference in New Issue
Block a user