mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
Compare commits
6 Commits
ca59e0ff65
...
48743a834a
Author | SHA1 | Date | |
---|---|---|---|
|
48743a834a | ||
|
9a708df324 | ||
|
7e0acf1f98 | ||
|
e929201dd0 | ||
|
947a5daa98 | ||
|
a3fe651ce2 |
2
.flake8
2
.flake8
@ -1,5 +1,5 @@
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
max-line-length = 88
|
||||
max-complexity = 24
|
||||
ignore = F401, W503, E203, E501, F841, E722, C901
|
||||
exclude =
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "24.5.15"
|
||||
__version__ = "24.10.8"
|
||||
|
@ -17,14 +17,14 @@ class Baidu(CheckIn):
|
||||
def url_submit(data_url: str, submit_url: str, times: int = 100) -> str:
|
||||
site = parse.parse_qs(parse.urlsplit(submit_url).query).get("site")[0]
|
||||
urls_data = requests.get(url=data_url)
|
||||
remian = 100000
|
||||
remain = 100000
|
||||
success_count = 0
|
||||
error_count = 0
|
||||
for one in range(times):
|
||||
try:
|
||||
response = requests.post(url=submit_url, data=urls_data)
|
||||
if response.json().get("success"):
|
||||
remian = response.json().get("remain")
|
||||
remain = response.json().get("remain")
|
||||
success_count += response.json().get("success")
|
||||
else:
|
||||
error_count += 1
|
||||
@ -33,7 +33,7 @@ class Baidu(CheckIn):
|
||||
error_count += 1
|
||||
msg = [
|
||||
{"name": "站点地址", "value": site},
|
||||
{"name": "剩余条数", "value": remian},
|
||||
{"name": "剩余条数", "value": remain},
|
||||
{"name": "成功条数", "value": success_count},
|
||||
{"name": "成功次数", "value": times - error_count},
|
||||
{"name": "失败次数", "value": error_count},
|
||||
|
@ -17,6 +17,11 @@ checkin_map = checkin_map()
|
||||
|
||||
notice_map = {
|
||||
"BARK_URL": "",
|
||||
"BARK_TITLE":"",
|
||||
"BARK_GROUP":"",
|
||||
"BARK_ICON":"",
|
||||
"BARK_SOUND":"",
|
||||
"BARK_URL_JUMP":"",
|
||||
"COOLPUSHEMAIL": "",
|
||||
"COOLPUSHQQ": "",
|
||||
"COOLPUSHSKEY": "",
|
||||
|
@ -19,9 +19,9 @@ class MiMotion(CheckIn):
|
||||
}
|
||||
|
||||
def get_time(self):
|
||||
url = "http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp"
|
||||
url = "https://f.m.suning.com/api/ct.do"
|
||||
response = requests.get(url, headers=self.headers).json()
|
||||
t = response["data"]["t"]
|
||||
t = response["currentTime"]
|
||||
return t
|
||||
|
||||
def get_app_token(self, login_token):
|
||||
|
@ -23,11 +23,11 @@ def message2server_turbo(sendkey, content):
|
||||
|
||||
|
||||
def message2coolpush(
|
||||
coolpushskey,
|
||||
content,
|
||||
coolpushqq: bool = True,
|
||||
coolpushwx: bool = False,
|
||||
coolpushemail: bool = False,
|
||||
coolpushskey,
|
||||
content,
|
||||
coolpushqq: bool = True,
|
||||
coolpushwx: bool = False,
|
||||
coolpushemail: bool = False,
|
||||
):
|
||||
print("Cool Push 推送开始")
|
||||
params = {"c": content, "t": "每日签到"}
|
||||
@ -102,15 +102,25 @@ def message2dingtalk(dingtalk_secret, dingtalk_access_token, content):
|
||||
return
|
||||
|
||||
|
||||
def message2bark(bark_url: str, content):
|
||||
def message2bark(bark_url: str, content, title: str = None, sound: str = None, group: str = None,
|
||||
icon: str = None,
|
||||
url_jump: str = None):
|
||||
print("Bark 推送开始")
|
||||
parms = {"sound": sound, "group": group, "icon": icon, "url": url_jump}
|
||||
if not bark_url.endswith("/"):
|
||||
bark_url += "/"
|
||||
content = quote_plus(content)
|
||||
url = f"{bark_url}{content}"
|
||||
if title:
|
||||
url = f"{bark_url}{title}/{content}?"
|
||||
for k, v in parms.items():
|
||||
if v:
|
||||
url += f"{k}={v}&"
|
||||
if url.endswith("&"):
|
||||
url = url[:-1]
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||
requests.get(url=url, headers=headers)
|
||||
return
|
||||
resp = requests.get(url=url, headers=headers)
|
||||
return resp
|
||||
|
||||
|
||||
def message2qywxrobot(qywx_key, content):
|
||||
@ -123,13 +133,13 @@ def message2qywxrobot(qywx_key, content):
|
||||
|
||||
|
||||
def message2qywxapp(
|
||||
qywx_corpid,
|
||||
qywx_agentid,
|
||||
qywx_corpsecret,
|
||||
qywx_touser,
|
||||
qywx_media_id,
|
||||
qywx_origin,
|
||||
content,
|
||||
qywx_corpid,
|
||||
qywx_agentid,
|
||||
qywx_corpsecret,
|
||||
qywx_touser,
|
||||
qywx_media_id,
|
||||
qywx_origin,
|
||||
content,
|
||||
):
|
||||
print("企业微信应用消息推送开始")
|
||||
base_url = "https://qyapi.weixin.qq.com"
|
||||
@ -210,6 +220,11 @@ def push_message(content_list: list, notice_info: dict):
|
||||
dingtalk_access_token = notice_info.get("dingtalk_access_token")
|
||||
fskey = notice_info.get("fskey")
|
||||
bark_url = notice_info.get("bark_url")
|
||||
bark_title = notice_info.get("bark_title")
|
||||
bark_icon = notice_info.get("bark_icon")
|
||||
bark_group = notice_info.get("bark_group")
|
||||
bark_sound = notice_info.get("bark_sound")
|
||||
bark_url_jump = notice_info.get("bark_url_jump") # 收到通知后点击打开的链接
|
||||
sckey = notice_info.get("sckey")
|
||||
sendkey = notice_info.get("sendkey")
|
||||
qmsg_key = notice_info.get("qmsg_key")
|
||||
@ -243,13 +258,13 @@ def push_message(content_list: list, notice_info: dict):
|
||||
print("获取重要通知失败:", e)
|
||||
if merge_push is None:
|
||||
if (
|
||||
qmsg_key
|
||||
or coolpushskey
|
||||
or qywx_touser
|
||||
or qywx_corpsecret
|
||||
or qywx_agentid
|
||||
or bark_url
|
||||
or pushplus_token
|
||||
qmsg_key
|
||||
or coolpushskey
|
||||
or qywx_touser
|
||||
or qywx_corpsecret
|
||||
or qywx_agentid
|
||||
or bark_url
|
||||
or pushplus_token
|
||||
):
|
||||
merge_push = False
|
||||
else:
|
||||
@ -288,7 +303,15 @@ def push_message(content_list: list, notice_info: dict):
|
||||
print("企业微信应用消息推送失败", e)
|
||||
if bark_url:
|
||||
try:
|
||||
message2bark(bark_url=bark_url, content=message)
|
||||
resp = message2bark(bark_url=bark_url, content=message, icon=bark_icon, group=bark_group,title=bark_title,
|
||||
sound=bark_sound,
|
||||
url_jump=bark_url_jump)
|
||||
error_msg=["414","431","large","long"]
|
||||
# 如果列表中的字符串存在于resp.text中,则分批发送
|
||||
if any(x in resp.text.lower() for x in error_msg):
|
||||
notice_info["merge_push"] = False
|
||||
print("Bark 推送内容过长,已自动切换为单条推送")
|
||||
push_message(content_list=content_list, notice_info=notice_info)
|
||||
except Exception as e:
|
||||
print("Bark 推送失败", e)
|
||||
if dingtalk_access_token and dingtalk_secret:
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"BARK_URL":"",
|
||||
"BARK_TITLE":"dailycheckin",
|
||||
"BARK_GROUP":"dailycheckin",
|
||||
"BARK_ICON":"https://cdn.jsdelivr.net/gh/Sitoi/Sitoi.github.io/medias/avatars/avatar.jpg",
|
||||
"BARK_SOUND":"",
|
||||
"BARK_URL_JUMP":"",
|
||||
"COOLPUSHEMAIL":true,
|
||||
"COOLPUSHQQ":true,
|
||||
"COOLPUSHSKEY":"",
|
||||
|
7
docs/pages/history/2024-10-08.mdx
Normal file
7
docs/pages/history/2024-10-08.mdx
Normal file
@ -0,0 +1,7 @@
|
||||
# 2024-10-08
|
||||
|
||||
![PyPI](https://img.shields.io/badge/Pypi-v24.10.8-brightgreen)
|
||||
|
||||
## 🐛 修复
|
||||
|
||||
- 修复「小米运动」获取时间戳失败的问题
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"2024-10-08": "2024-10-08",
|
||||
"2024-05-15": "2024-05-15",
|
||||
"2024-03-19": "2024-03-19",
|
||||
"2024-03-11": "2024-03-11",
|
||||
|
@ -51,23 +51,22 @@
|
||||
## 🧾 列表
|
||||
|
||||
🟢: 正常运行 🔴: 脚本暂不可用 🔵: 可以执行(需更新) 🟡: 待测试 🟤: 看脸
|
||||
|
||||
| 状态 | 任务名称 | 名称网站 | 检查日期 | 备注 |
|
||||
| 状态 | 任务名称 | 名称网站 | 检查日期 | 备注 |
|
||||
| ---- | -------- | ---------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 🟢️ | KGQQ | [全民 K 歌](https://kg.qq.com/index-pc.html) | 24.02.20 | 每日签到获取鲜花 每日大约 120 鲜花左右 |
|
||||
| 🟢️ | YOUDAO | [有道云笔记](https://note.youdao.com/web/) | 24.02.20 | 每日签到获取存储空间 |
|
||||
| 🟢️ | TIEBA | [百度贴吧](https://tieba.baidu.com/index.html) | 24.02.20 | 贴吧每日签到 |
|
||||
| 🟢️ | BILIBILI | [BiliBili](https://www.bilibili.com/) | 24.02.20 | 直播签到,漫画签到,每日经验任务,自动投币,银瓜子换硬币等功能 |
|
||||
| 🟢️ | V2EX | [V2EX](https://www.v2ex.com/) | 24.02.20 | 铜币奖励 |
|
||||
| 🟢️ | ACFUN | [AcFun](https://www.acfun.cn/) | 24.02.20 | 每日签到香蕉 |
|
||||
| 🟢️ | IQIYI | [爱奇艺](https://www.iqiyi.com/) | 24.02.20 | ① 满签得 7 天会员;② 日常任务 4 成长值;③ 爱奇艺刷时长任务,10 成长值;④ 每日签到随机成长值;⑤ 抽白金会员 5 次;⑥ 摇一摇抽奖 3 次;⑦ 抽奖 3 次 |
|
||||
| 🟢️ | SMZDM | [什么值得买](https://www.smzdm.com/) | 24.02.20 | 签到和抽奖 |
|
||||
| 🟢️ | ALIYUN | [阿里云盘](https://www.aliyundrive.com/drive/) | 24.02.20 | 签到获取免费会员和空间 |
|
||||
| 🟢️ | ENSHAN | [恩山无线论坛](https://www.right.com.cn/forum/) | 24.02.20 | 签到获取硬币和积分 |
|
||||
| 🟢️ | AOLAXING | [奥拉星](http://www.100bt.com/m/creditMall/?gameId=2#task) | 24.02.20 | 签到获取积分 |
|
||||
| 🟢️ | IMAOTAI | i 茅台 | 24.02.20 | 申购生肖茅台 |
|
||||
| 🟤 | MIMOTION | 小米运动 | 24.02.20 | 每日小米运动刷步数 |
|
||||
| 🟢️ | BAIDU | [百度站点](https://ziyuan.baidu.com/site/index#/) | 24.02.20 | 提交网站页面供百度收录 |
|
||||
| 🟢️ | KGQQ | [全民 K 歌](https://kg.qq.com/index-pc.html) | 24.02.20 | 每日签到获取鲜花 每日大约 120 鲜花左右 |
|
||||
| 🟢️ | YOUDAO | [有道云笔记](https://note.youdao.com/web/) | 24.02.20 | 每日签到获取存储空间 |
|
||||
| 🟢️ | TIEBA | [百度贴吧](https://tieba.baidu.com/index.html) | 24.02.20 | 贴吧每日签到 |
|
||||
| 🟢️ | BILIBILI | [BiliBili](https://www.bilibili.com/) | 24.02.20 | 直播签到,漫画签到,每日经验任务,自动投币,银瓜子换硬币等功能 |
|
||||
| 🟢️ | V2EX | [V2EX](https://www.v2ex.com/) | 24.02.20 | 铜币奖励 |
|
||||
| 🟢️ | ACFUN | [AcFun](https://www.acfun.cn/) | 24.02.20 | 每日签到香蕉 |
|
||||
| 🟢️ | IQIYI | [爱奇艺](https://www.iqiyi.com/) | 24.02.20 | ① 满签得 7 天会员;② 日常任务 4 成长值;③ 爱奇艺刷时长任务,10 成长值;④ 每日签到随机成长值;⑤ 抽白金会员 5 次;⑥ 摇一摇抽奖 3 次;⑦ 抽奖 3 次 |
|
||||
| 🟢️ | SMZDM | [什么值得买](https://www.smzdm.com/) | 24.02.20 | 签到和抽奖 |
|
||||
| 🟢️ | ALIYUN | [阿里云盘](https://www.aliyundrive.com/drive/) | 24.02.20 | 签到获取免费会员和空间 |
|
||||
| 🟢️ | ENSHAN | [恩山无线论坛](https://www.right.com.cn/forum/) | 24.02.20 | 签到获取硬币和积分 |
|
||||
| 🟢️ | AOLAXING | [奥拉星](http://www.100bt.com/m/creditMall/?gameId=2#task) | 24.02.20 | 签到获取积分 |
|
||||
| 🟢️ | IMAOTAI | i 茅台 | 24.02.20 | 申购生肖茅台 |
|
||||
| 🟤 | MIMOTION | 小米运动 | 24.02.20 | 每日小米运动刷步数 |
|
||||
| 🟢️ | BAIDU | [百度站点](https://ziyuan.baidu.com/site/index#/) | 24.02.20 | 提交网站页面供百度收录 |
|
||||
|
||||
## 💬 通知列表
|
||||
|
||||
|
@ -110,9 +110,9 @@ import { Steps } from 'nextra/components'
|
||||
|
||||
### 点击 Network 标签
|
||||
|
||||
### 选择 Doc 标签
|
||||
### 选择 Fetch/XHR 标签
|
||||
|
||||
### 选中 www.bilibili.com
|
||||
### 选中 https://api.bilibili.com/x/space/user/setting/list
|
||||
|
||||
### 下滑找到 cookie 全选复制即可
|
||||
|
||||
|
@ -51,7 +51,7 @@ import { Callout } from 'nextra/components'
|
||||
# BARK
|
||||
|
||||
<Callout type="warning">
|
||||
通知消息在 Bark 有长度限制,如果没收到推送,请将 MERGE_PUSH 改为 false
|
||||
通知消息在 Bark 有长度限制,如果内容过长导致推送失败,会自动切换为单条推送。
|
||||
</Callout>
|
||||
|
||||
### 配置示例
|
||||
@ -59,11 +59,22 @@ import { Callout } from 'nextra/components'
|
||||
```json filename="config.json" copy
|
||||
{
|
||||
"BARK_URL": "",
|
||||
"MERGE_PUSH": ""
|
||||
"BARK_TITLE": "",
|
||||
"BARK_GROUP": "",
|
||||
"BARK_ICON": "",
|
||||
"BARK_SOUND": "",
|
||||
"BARK_URL_JUMP": "",
|
||||
|
||||
"MERGE_PUSH": true
|
||||
}
|
||||
```
|
||||
|
||||
| 参数 | 说明 |
|
||||
| :--------------: | :--------------------------------------------------------------------------------------------: |
|
||||
| _**BARK_URL**_ | [BARK](https://bark.day.app/#/) ,填写 `BARK_URL` 例: `https://api.day.app/DxHcxxxxxRxxxxxxcm/` |
|
||||
| _**BARK_TITLE(可选)**_ | 推送标题,例:`dailycheckin` |
|
||||
| _**BARK_GROUP(可选)**_ | Bark中消息分组,例:`dailycheckin` |
|
||||
| _**BARK_ICON(可选)**_ | 推送图标,例:`https://example.com/icon.png` |
|
||||
| _**BARK_SOUND(可选)**_ | 推送铃声,请在app中查看铃声列表,例:`bell` |
|
||||
| _**BARK_URL_JUMP(可选)**_ | 推送消息点击跳转链接,例:`https://example.com` |
|
||||
| _**MERGE_PUSH**_ | **true**: 将推送消息合并;**false**: 分开推送 |
|
||||
|
@ -72,13 +72,13 @@ const config: DocsThemeConfig = {
|
||||
}
|
||||
},
|
||||
banner: {
|
||||
key: '2024.5.15-release',
|
||||
key: '2024.10.8-release',
|
||||
text: (
|
||||
<a
|
||||
href="/dailycheckin/history/2024-05-15/"
|
||||
href="/dailycheckin/history/2024-10-08/"
|
||||
target="_blank"
|
||||
>
|
||||
🎉 DailyCheckIn 2024.5.15 is released. Read more →
|
||||
🎉 DailyCheckIn 2024.10.8 is released. Read more →
|
||||
</a>
|
||||
),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user