From 9efde6ced0c8dba5072c187cc49282cb2c7e44ff Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Sat, 12 Oct 2024 10:16:15 +0800
Subject: [PATCH 01/11] Create main2.yml
auto ikuuu
---
.github/workflows/main2.yml | 42 +++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 .github/workflows/main2.yml
diff --git a/.github/workflows/main2.yml b/.github/workflows/main2.yml
new file mode 100644
index 0000000..8490e40
--- /dev/null
+++ b/.github/workflows/main2.yml
@@ -0,0 +1,42 @@
+name: "Airport Checkin"
+
+on:
+ schedule:
+ - cron: "0 22 * * *" # scheduled at 06:00 (UTC+8) everyday
+ workflow_dispatch:
+
+env:
+ RUN_ENV: 'prod'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ # if: github.ref == 'refs/heads/master'
+
+ steps:
+ - name: Checkout master
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ # ref: master
+
+ - name: Set up python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+
+ - name: Random sleep
+ if: github.event_name == 'schedule'
+ run: sleep $(shuf -i 10-100 -n 1)
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ - name: Run sign
+ env:
+ SCKEY: ${{ secrets.SCKEY }}
+ EMAIL: ${{ secrets.EMAIL }}
+ PASSWD: ${{ secrets.PASSWD }}
+ run: |
+ python3 ./main.py
From fe7924a5f917af01aa57410398cca065b556937f Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Sat, 12 Oct 2024 10:19:52 +0800
Subject: [PATCH 02/11] Update main.py
new url
---
main.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.py b/main.py
index 870d4c3..6740b94 100644
--- a/main.py
+++ b/main.py
@@ -24,9 +24,9 @@ def push(content):
# 会不定时更新域名,记得Sync fork
-login_url = 'https://ikuuu.me/auth/login'
-check_url = 'https://ikuuu.me/user/checkin'
-info_url = 'https://ikuuu.me/user/profile'
+login_url = 'https://ikuuu.pw/auth/login'
+check_url = 'https://ikuuu.pw/user/checkin'
+info_url = 'https://ikuuu.pw/user/profile'
header = {
'origin': 'https://ikuuu.me',
From 6821e1b1c0eb705e6039b970184953775998e668 Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Sat, 12 Oct 2024 10:21:16 +0800
Subject: [PATCH 03/11] Update main.py
new url
---
main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.py b/main.py
index 6740b94..646c837 100644
--- a/main.py
+++ b/main.py
@@ -29,7 +29,7 @@ def push(content):
info_url = 'https://ikuuu.pw/user/profile'
header = {
- 'origin': 'https://ikuuu.me',
+ 'origin': 'https://ikuuu.pw',
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
}
data = {
From 9f3313711cb2bcd75f5212b66298fd381045bf4c Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 09:54:43 +0800
Subject: [PATCH 04/11] Update main.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
多账号签到
---
main.py | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/main.py b/main.py
index 646c837..02fa6df 100644
--- a/main.py
+++ b/main.py
@@ -2,9 +2,13 @@
session = requests.session()
# 配置用户名(一般是邮箱)
-email = os.environ.get('EMAIL')
+# email = os.environ.get('EMAIL')
# 配置用户名对应的密码 和上面的email对应上
-passwd = os.environ.get('PASSWD')
+# passwd = os.environ.get('PASSWD')
+# 从环境变量中读取多个邮箱和密码
+emails = os.environ.get('EMAILS', '').split(',')
+passwords = os.environ.get('PASSWDS', '').split(',')
+
# server酱
SCKEY = os.environ.get('SCKEY')
# PUSHPLUS
@@ -32,18 +36,21 @@ def push(content):
'origin': 'https://ikuuu.pw',
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
}
-data = {
+
+for email, passwd in zip(emails, passwords):
+ session = requests.session()
+ data = {
'email': email,
'passwd': passwd
}
try:
- print('进行登录...')
+ print(f'[{email}] 进行登录...')
response = json.loads(session.post(url=login_url,headers=header,data=data).text)
print(response['msg'])
# 获取账号名称
info_html = session.get(url=info_url,headers=header).text
-# info = "".join(re.findall('(.*?)', info_html, re.S))
-# print(info)
+ # info = "".join(re.findall('(.*?)', info_html, re.S))
+ # print(info)
# 进行签到
result = json.loads(session.post(url=check_url,headers=header).text)
print(result['msg'])
From a6f4076ac18f4fab76064fbe487c7813a3c9689c Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 10:04:15 +0800
Subject: [PATCH 05/11] Update main.yml
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
环境变量使用vars
---
.github/workflows/main.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8490e40..7666ac7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -36,7 +36,7 @@ jobs:
- name: Run sign
env:
SCKEY: ${{ secrets.SCKEY }}
- EMAIL: ${{ secrets.EMAIL }}
- PASSWD: ${{ secrets.PASSWD }}
+ EMAIL: ${{ vars.EMAIL }}
+ PASSWD: ${{ vars.PASSWD }}
run: |
python3 ./main.py
From 7778926965e4d0711719de2ea3c8b8d807311f87 Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 11:23:29 +0800
Subject: [PATCH 06/11] Update main.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
输出登录信息
---
main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.py b/main.py
index 02fa6df..61e8363 100644
--- a/main.py
+++ b/main.py
@@ -44,7 +44,7 @@ def push(content):
'passwd': passwd
}
try:
- print(f'[{email}] 进行登录...')
+ print(f'[{data}] 进行登录...')
response = json.loads(session.post(url=login_url,headers=header,data=data).text)
print(response['msg'])
# 获取账号名称
From 4066a5f91f1e36776a7fb4200536d03966431b52 Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 11:26:40 +0800
Subject: [PATCH 07/11] Update main.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复环境变量从var里获取
---
main.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.py b/main.py
index 61e8363..74ad633 100644
--- a/main.py
+++ b/main.py
@@ -6,8 +6,8 @@
# 配置用户名对应的密码 和上面的email对应上
# passwd = os.environ.get('PASSWD')
# 从环境变量中读取多个邮箱和密码
-emails = os.environ.get('EMAILS', '').split(',')
-passwords = os.environ.get('PASSWDS', '').split(',')
+emails = os.environ.get('EMAIL', '').split(',')
+passwords = os.environ.get('PASSWD', '').split(',')
# server酱
SCKEY = os.environ.get('SCKEY')
From 6a93daa747500cd41d069de0f759d718d07d138f Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 11:31:32 +0800
Subject: [PATCH 08/11] Update main.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
改进缩进,修复多账号问题
---
main.py | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/main.py b/main.py
index 74ad633..0f3cade 100644
--- a/main.py
+++ b/main.py
@@ -42,22 +42,22 @@ def push(content):
data = {
'email': email,
'passwd': passwd
-}
-try:
- print(f'[{data}] 进行登录...')
- response = json.loads(session.post(url=login_url,headers=header,data=data).text)
- print(response['msg'])
- # 获取账号名称
- info_html = session.get(url=info_url,headers=header).text
- # info = "".join(re.findall('(.*?)', info_html, re.S))
- # print(info)
- # 进行签到
- result = json.loads(session.post(url=check_url,headers=header).text)
- print(result['msg'])
- content = result['msg']
- # 进行推送
- push(content)
-except:
- content = '签到失败'
- print(content)
- push(content)
+ }
+ try:
+ print(f'[{email}] 进行登录...')
+ response = json.loads(session.post(url=login_url,headers=header,data=data).text)
+ print(response['msg'])
+ # 获取账号名称
+ info_html = session.get(url=info_url,headers=header).text
+ # info = "".join(re.findall('(.*?)', info_html, re.S))
+ print(获取账号名称 [{info_html}])
+ # 进行签到
+ result = json.loads(session.post(url=check_url,headers=header).text)
+ print(result['msg'])
+ content = result['msg']
+ # 进行推送
+ push(content)
+ except:
+ content = '签到失败'
+ print(content)
+ push(content)
From b2c120f394ec4bb00905db0179c62434828bfc46 Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:06:34 +0800
Subject: [PATCH 09/11] Update main.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
完善介绍信息
---
main.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/main.py b/main.py
index 0f3cade..eb9921b 100644
--- a/main.py
+++ b/main.py
@@ -5,7 +5,7 @@
# email = os.environ.get('EMAIL')
# 配置用户名对应的密码 和上面的email对应上
# passwd = os.environ.get('PASSWD')
-# 从环境变量中读取多个邮箱和密码
+# 从设置的环境变量中的Variables多个邮箱和密码 ,分割
emails = os.environ.get('EMAIL', '').split(',')
passwords = os.environ.get('PASSWD', '').split(',')
@@ -48,9 +48,8 @@ def push(content):
response = json.loads(session.post(url=login_url,headers=header,data=data).text)
print(response['msg'])
# 获取账号名称
- info_html = session.get(url=info_url,headers=header).text
- # info = "".join(re.findall('(.*?)', info_html, re.S))
- print(获取账号名称 [{info_html}])
+ # info_html = session.get(url=info_url,headers=header).text
+ # info = "".join(re.findall('(.*?)', info_html, re.S))
# 进行签到
result = json.loads(session.post(url=check_url,headers=header).text)
print(result['msg'])
From 485783eac8ac61028c34b09b2fdd04f313c3020f Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:11:20 +0800
Subject: [PATCH 10/11] Update README.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修改描述
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 4228c55..6b545f9 100644
--- a/README.md
+++ b/README.md
@@ -14,10 +14,10 @@
| 参数 | 内容 |
| ------------ | ------------ |
-| EMAIL | 账号邮箱 |
-| PASSWD | 账号密码 |
-| SCKEY | Sever酱密钥 |
-| TOKEN | pushplus密钥 |
+| EMAIL | 账号邮箱 | Variables
+| PASSWD | 账号密码 | Variables
+| SCKEY | Sever酱密钥 | Secrets
+| TOKEN | pushplus密钥 | Secrets
3. 到`Actions`中创建一个workflow,运行一次,以后每天项目都会自动运行。
4. 最后,可以到Run sign查看签到情况,同时也会也会将签到详情推送到Sever酱。
From 59b77dcbe00f80120c63cacfd5b95c5bf9d50e98 Mon Sep 17 00:00:00 2001
From: LuoHui666 <54461664+LuoHui666@users.noreply.github.com>
Date: Mon, 14 Oct 2024 12:12:17 +0800
Subject: [PATCH 11/11] Update README.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
完善描述
---
README.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 6b545f9..a21c7f8 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,12 @@
1. 右上角Fork此仓库
2. 然后到`Settings`→`Secrets and variables`→`Actions` 新建以下参数:
-| 参数 | 内容 |
-| ------------ | ------------ |
-| EMAIL | 账号邮箱 | Variables
-| PASSWD | 账号密码 | Variables
-| SCKEY | Sever酱密钥 | Secrets
-| TOKEN | pushplus密钥 | Secrets
+| 参数 | 内容 | 变量类型 |
+| ------------ | ------------ | ------------ |
+| EMAIL | 账号邮箱 | Variables |
+| PASSWD | 账号密码 | Variables |
+| SCKEY | Sever酱密钥 | Secrets |
+| TOKEN | pushplus密钥 | Secrets |
3. 到`Actions`中创建一个workflow,运行一次,以后每天项目都会自动运行。
4. 最后,可以到Run sign查看签到情况,同时也会也会将签到详情推送到Sever酱。