Skip to content

Commit eaf7d93

Browse files
authored
Update main.py
解决登录失败
1 parent 789234c commit eaf7d93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def wrapper(*args, **kwargs):
3535
PASSWORD = os.environ.get("PASSWORD")
3636

3737
HOME_URL = "https://linux.do/"
38+
LOGIN_URL = "https://linux.do/login"
3839

3940

4041
class LinuxDoBrowser:
@@ -47,7 +48,8 @@ def __init__(self) -> None:
4748

4849
def login(self):
4950
logger.info("开始登录")
50-
self.page.click(".login-button .d-button-label")
51+
# self.page.click(".login-button .d-button-label")
52+
self.page.goto(LOGIN_URL)
5153
time.sleep(2)
5254
self.page.fill("#login-account-name", USERNAME)
5355
time.sleep(2)

0 commit comments

Comments
 (0)