diff --git a/spider/task.py b/spider/task.py index 74425f9..b3d1b06 100644 --- a/spider/task.py +++ b/spider/task.py @@ -25,7 +25,7 @@ from exceptions import AuthException, OperationFailed from miniofile import client, put_object # 登录, 检查账号, 获取账号配置, 更新账号配置是否隐藏浏览器 -HEADLESS = True +HEADLESS = False def sleep(a, b=None): @@ -59,8 +59,11 @@ def update_windows_distinguish(x=1920, y=1080): def _change_language(page): sleep(2, 3) # 找到顶部头像按钮并点击 - page.wait_for_selector('div[role="button"] svg image[style*="height:40px"][style*="width:40px"]', - timeout=10000).click(force=True) + selector = ''' + div[role="button"] svg image[style*="height: 40px"][style*="width: 40px"], + div[role="button"] svg image[style*="height:40px"][style*="width:40px"] + ''' + page.wait_for_selector(selector, timeout=10000).click(force=True) sleep(1, 2) # 点击设置图标 page.wait_for_selector('//div[@role="list"]/div[@role="listitem"][1]', timeout=30000).click(force=True)