home0928a

This commit is contained in:
2025-09-28 21:32:47 +08:00
parent 11dcf83e1f
commit 3adaee0e9e
+3
View File
@@ -131,6 +131,7 @@ class Sinopec_ewcc(object):
def login(self,username=None,userpass=None,otp=None):
self.browser.set.cookies.clear
self.tab.get(self.url)
self.tab.wait.eles_loaded('xpath://*[@id="authen1Form"]/button')
time.sleep(5)
@@ -151,6 +152,7 @@ class Sinopec_ewcc(object):
### 判断是否有仍然发生的界面
try:
ele_process = self.tab.ele('#proceed-button')
time.sleep(2)
if ele_process:
ele_process.click()
logger.info("继续发送按钮存在并已点击")
@@ -165,6 +167,7 @@ class Sinopec_ewcc(object):
# 2 如果没有登录 ,则使用cookie登录
if not self.is_login():
logger.info('使用cookies尝试登录')
self.browser.set.cookies.clear
self.init_cookies(cookies)
self.tab.get(self.url)
self.tab.refresh()