Skip to content

Commit 026b5b5

Browse files
authored
Merge pull request doveppp#21 from flechneo/main
fix login err
2 parents ed3b73e + eaf7d93 commit 026b5b5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/daily-check-in.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Daily Check-in
22

33
on:
44
schedule:
5+
#- cron: '0 1 * * *' # 每天1点 UTC 时间执行
56
- cron: '0 */12 * * *' # 每12小时执行一次
7+
68
workflow_dispatch:
79

810
jobs:

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)