diff --git a/README.md b/README.md index 0552582..bfccf3a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# 0.1.3 +- 修复脚本bug # 0.1.2 - 优化自动化脚本 # 0.1.1 diff --git a/spider/main.py b/spider/main.py index 74d3c23..f7a76ac 100644 --- a/spider/main.py +++ b/spider/main.py @@ -118,6 +118,7 @@ class Auto: continue_button = self.tab.ele( 't:button@text():Continue', timeout=1) if continue_button: + jc += 1 # 滚动到最底部 self.tab.scroll.to_bottom() self.tab.wait(1) @@ -127,7 +128,6 @@ class Auto: logger.debug("Cloudflare验证失败..") self.tab.refresh() self.tab.wait(1.5) - jc += 1 continue else: logger.debug("Cloudflare验证成功..") @@ -145,6 +145,12 @@ class Auto: # self.tab.wait(1) # return self.click_continue(bl=True) + bol = self.tab.ele( + 't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1) + if bol: + logger.debug("刷新网页") + self.tab.refresh() + self.tab.wait(1.5) bol = self.tab.ele( 't:h1@text()=Sorry, you have been blocked', timeout=1) if bol: @@ -448,6 +454,12 @@ class Auto: ) return True + bol = self.tab.ele( + 't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1) + if bol: + logger.debug("刷新网页") + self.tab.refresh() + self.tab.wait(1.5) bol = self.solve_cloudflare() if not bol: logger.debug("Cloudflare验证失败.")