mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
Compare commits
5 Commits
9470af5d67
...
1c63c8fb76
Author | SHA1 | Date | |
---|---|---|---|
|
1c63c8fb76 | ||
|
c5547ea634 | ||
|
bd6354702a | ||
|
4067f3c6df | ||
|
f548f26ec1 |
32
README.md
32
README.md
@ -28,6 +28,38 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
## 如何使用本仓库内容
|
||||
|
||||
在青龙创建一个订阅
|
||||
|
||||
拉库命令 `ql repo https://github.com/Fansirsqi/dailycheckin.git null null null main`
|
||||
|
||||
配置执行后运行的命令
|
||||
`pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install requests pycrypto pycryptodome && cd /ql/data/repo/Fansirsqi_dailycheckin_main && python setup.py develop`
|
||||
|
||||
在脚本管理根目录创建`config.json`配置文件可以参考官方配置,这里只是增加了一段
|
||||
|
||||
[配置示例](https://gist.githubusercontent.com/Fansirsqi/9e238bb3e432fdb7bee1caa46da81519/raw/5a7d599b526564c68b0120e9a275ce6f414757df/config.json)
|
||||
|
||||
```
|
||||
,
|
||||
"TESTNOTICE": [
|
||||
{
|
||||
"test1": "test1mesg"
|
||||
}
|
||||
]
|
||||
```
|
||||
强烈建议您在`https://www.json.cn/`这个网站检查您的配置
|
||||
|
||||
最后在定时任务里创建一个测试任务
|
||||
|
||||
`task dailycheckin --include TESTNOTICE`运行并查看日志
|
||||
|
||||
![1715763862230.png](https://pic2.ziyuan.wang/user/fansir/2024/05/1715763862230_5344cb6724871.png)
|
||||
|
||||
![1715763931708.png](https://pic2.ziyuan.wang/user/fansir/2024/05/1715763931708_ec7c766df87c4.png)
|
||||
|
||||
## ✨ 特性
|
||||
|
||||
- 📦 支持 Pypi 包安装
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "24.3.19"
|
||||
__version__ = "24.5.15"
|
||||
|
@ -40,7 +40,13 @@ class IQIYI(CheckIn):
|
||||
if re.findall(r"__dfp=(.*?);", cookie)
|
||||
else ""
|
||||
)
|
||||
return p00001, p00002, p00003, __dfp
|
||||
__dfp = __dfp.split("@")[0]
|
||||
qyid = (
|
||||
re.findall(r"QC005=(.*?);", cookie)[0]
|
||||
if re.findall(r"QC005=(.*?);", cookie)
|
||||
else ""
|
||||
)
|
||||
return p00001, p00002, p00003, __dfp, qyid
|
||||
|
||||
@staticmethod
|
||||
def user_information(p00001):
|
||||
@ -76,29 +82,47 @@ class IQIYI(CheckIn):
|
||||
]
|
||||
return msg
|
||||
|
||||
def sign(self, p00001, p00003):
|
||||
def k(self, secret_key, data, split="|"):
|
||||
result_string = split.join(f"{key}={data[key]}" for key in sorted(data))
|
||||
return md5((result_string + split + secret_key).encode("utf-8")).hexdigest()
|
||||
|
||||
def sign(self, p00001, p00003, dfp, qyid):
|
||||
"""
|
||||
VIP 签到
|
||||
"""
|
||||
qyid = uuid4().hex[:16]
|
||||
time_stamp = int(time.time() * 1000)
|
||||
data = f"agentType=1|agentversion=1|appKey=basic_pcw|authCookie={p00001}|qyid={qyid}|task_code=natural_month_sign|timestamp={time_stamp}|typeCode=point|userId={p00003}|UKobMjDMsDoScuWOfp6F"
|
||||
sign = md5(data.encode(encoding="utf-8")).hexdigest()
|
||||
url = f"https://community.iqiyi.com/openApi/task/execute?agentType=1&agentversion=1&appKey=basic_pcw&authCookie={p00001}&qyid={qyid}&sign={sign}&task_code=natural_month_sign×tamp={time_stamp}&typeCode=point&userId={p00003}"
|
||||
body = {
|
||||
sign_date = {
|
||||
"agenttype": 20,
|
||||
"agentversion": "15.4.6",
|
||||
"appKey": "lequ_rn",
|
||||
"appver": "15.4.6",
|
||||
"authCookie": p00001,
|
||||
"qyid": qyid,
|
||||
"srcplatform": 20,
|
||||
"task_code": "natural_month_sign",
|
||||
"timestamp": time_stamp,
|
||||
"userId": p00003,
|
||||
}
|
||||
sign = self.k("cRcFakm9KSPSjFEufg3W", sign_date)
|
||||
sign_date["sign"] = sign
|
||||
data = {
|
||||
"natural_month_sign": {
|
||||
"verticalCode": "iQIYI",
|
||||
"taskCode": "iQIYI_mofhr",
|
||||
"agentType": 1,
|
||||
"agentversion": 1,
|
||||
"authCookie": p00001,
|
||||
"qyid": qyid,
|
||||
"verticalCode": "iQIYI",
|
||||
"agentType": 20,
|
||||
"agentVersion": "15.4.6",
|
||||
"dfp": dfp,
|
||||
"signFrom": 1,
|
||||
}
|
||||
}
|
||||
url = "https://community.iqiyi.com/openApi/task/execute"
|
||||
res = requests.post(
|
||||
url=url,
|
||||
data=json.dumps(body),
|
||||
headers={"Cookie": f"P00001={p00001}", "Content-Type": "application/json"},
|
||||
params=sign_date,
|
||||
data=json.dumps(data),
|
||||
headers={"Content-Type": "application/json"},
|
||||
).json()
|
||||
if res["code"] == "A00000":
|
||||
_msg = res["data"]["msg"]
|
||||
@ -407,7 +431,9 @@ class IQIYI(CheckIn):
|
||||
return [{"name": "白金抽奖", "value": "未中奖"}]
|
||||
|
||||
def main(self):
|
||||
p00001, p00002, p00003, dfp = self.parse_cookie(self.check_item.get("cookie"))
|
||||
p00001, p00002, p00003, dfp, qyid = self.parse_cookie(
|
||||
self.check_item.get("cookie")
|
||||
)
|
||||
try:
|
||||
user_info = json.loads(unquote(p00002, encoding="utf-8"))
|
||||
user_name = user_info.get("user_name")
|
||||
@ -417,7 +443,7 @@ class IQIYI(CheckIn):
|
||||
print(f"获取账号信息失败,错误信息: {e}")
|
||||
nickname = "未获取到,请检查 Cookie 中 P00002 字段"
|
||||
user_name = "未获取到,请检查 Cookie 中 P00002 字段"
|
||||
sign_msg = self.sign(p00001=p00001, p00003=p00003)
|
||||
sign_msg = self.sign(p00001=p00001, p00003=p00003, dfp=dfp, qyid=qyid)
|
||||
_user_msg = self.user_information(p00001=p00001)
|
||||
lotto_lottery_msg = self.lotto_lottery(p00001=p00001)
|
||||
if _user_msg[4].get("value") != "非 VIP 用户":
|
||||
|
7
docs/pages/history/2024-05-15.mdx
Normal file
7
docs/pages/history/2024-05-15.mdx
Normal file
@ -0,0 +1,7 @@
|
||||
# 2024-05-15
|
||||
|
||||
![PyPI](https://img.shields.io/badge/Pypi-v24.5.15-brightgreen)
|
||||
|
||||
## 🐛 修复
|
||||
|
||||
- 修复「爱奇艺」签到失效的问题
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"2024-05-15": "2024-05-15",
|
||||
"2024-03-19": "2024-03-19",
|
||||
"2024-03-11": "2024-03-11",
|
||||
"2024-03-07": "2024-03-07",
|
||||
|
@ -72,13 +72,13 @@ const config: DocsThemeConfig = {
|
||||
}
|
||||
},
|
||||
banner: {
|
||||
key: '2024.3.19-release',
|
||||
key: '2024.5.15-release',
|
||||
text: (
|
||||
<a
|
||||
href="/dailycheckin/history/2024-03-19/"
|
||||
href="/dailycheckin/history/2024-05-15/"
|
||||
target="_blank"
|
||||
>
|
||||
🎉 DailyCheckIn 2024.3.19 is released. Read more →
|
||||
🎉 DailyCheckIn 2024.5.15 is released. Read more →
|
||||
</a>
|
||||
),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user