From 99cf5863ea82e8414ca4e34bcd9b5c30132ee2d1 Mon Sep 17 00:00:00 2001 From: Sinyu <1341156974@qq.com> Date: Mon, 20 Oct 2025 10:51:54 +0800 Subject: [PATCH 1/3] Update checkin.yml --- .github/workflows/checkin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index badbc21..12dc96e 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -13,6 +13,7 @@ jobs: matrix: os: [ubuntu-latest] # os: [ubuntu-latest, self-hosted] + # test runs-on: ${{ matrix.os }} @@ -50,3 +51,4 @@ jobs: - name: Check-in run: python ./message.py + From 7929efbf4826fb17c42a1cac8b16e1b172d58079 Mon Sep 17 00:00:00 2001 From: sinyu <1341156974@qq.com> Date: Mon, 20 Oct 2025 11:07:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20add=20Server=E9=85=B1=20(ServerChan?= =?UTF-8?q?)=20push=20notification=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add SERVERPUSHKEY configuration to support Server酱 push notifications for check-in results, alongside existing Telegram support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/checkin.yml | 1 + README.md | 9 ++++++++- message.py | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 12dc96e..7242803 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -27,6 +27,7 @@ jobs: PICA_PASSWORD: ${{ secrets.PICA_PASSWORD }} TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} TG_USER_ID: ${{ secrets.TG_USER_ID }} + SERVERPUSHKEY: ${{ secrets.SERVERPUSHKEY }} steps: - name: Checkout repo diff --git a/README.md b/README.md index fd13cce..4ca8c0a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ GitHub issues

-使用 Github Action 签到,用哪个就配置相应的环境变量,默认输出到控制台,支持 Telegram 消息推送。 +使用 Github Action 签到,用哪个就配置相应的环境变量,默认输出到控制台,支持 Telegram 和 Server酱 消息推送。 ## 说明 @@ -18,6 +18,7 @@ - [x] yamibo 论坛(对象) - [x] yurifans 论坛(积分) - [x] telegram-bot 推送 +- [x] Server酱 推送 - [ ] ff14 (积分)【修复中】 - [ ] 哔咔漫画打卡(哔咔)【未验证】 @@ -59,6 +60,12 @@ Telegram 推送签到结果 | TG_BOT_TOKEN | bot token | [How Do I Create a Bot?](https://core.telegram.org/bots#how-do-i-create-a-bot) | | TG_USER_ID | user id | [How can I send a message to someone with my telegram bot using their Username](https://stackoverflow.com/questions/41664810/how-can-i-send-a-message-to-someone-with-my-telegram-bot-using-their-username) | +### Server酱 推送 + +| Name | Description | How to | +|---------------|-------------|-------------------------------------------------------| +| SERVERPUSHKEY | SendKey | [Server酱官网](https://sct.ftqq.com/) 获取 SendKey 密钥 | + ### V2EX V2EX 论坛使用 Cookie 登录 diff --git a/message.py b/message.py index b0b7de9..13bd810 100644 --- a/message.py +++ b/message.py @@ -13,10 +13,12 @@ from Yamibo import yamibo_checkin from Yurifans import yurifans_checkin from telegram import Bot +import requests # info TG_USER_ID = os.environ.get("TG_USER_ID") TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN") +SERVERPUSHKEY = os.environ.get("SERVERPUSHKEY") if __name__ == '__main__': start_time = time.time() @@ -48,4 +50,19 @@ parse_mode="HTML" ) + if SERVERPUSHKEY: + server_url = f"https://sctapi.ftqq.com/{SERVERPUSHKEY}.send" + data = { + "title": "Daily Bonus 签到通知", + "desp": content + } + try: + response = requests.post(server_url, data=data) + if response.status_code == 200: + print("Server酱推送成功") + else: + print(f"Server酱推送失败: {response.status_code}") + except Exception as e: + print(f"Server酱推送异常: {str(e)}") + print(content) From 680c39b17a82c5396733615956dc90a1e6466c50 Mon Sep 17 00:00:00 2001 From: Sinyu <1341156974@qq.com> Date: Mon, 20 Oct 2025 12:17:51 +0800 Subject: [PATCH 3/3] Update checkin.yml --- .github/workflows/checkin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 7242803..d00aceb 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -13,7 +13,6 @@ jobs: matrix: os: [ubuntu-latest] # os: [ubuntu-latest, self-hosted] - # test runs-on: ${{ matrix.os }} @@ -53,3 +52,4 @@ jobs: - name: Check-in run: python ./message.py +