Compare commits

..

1 Commits

Author SHA1 Message Date
Byseven
9470af5d67
Merge 6514decda7 into 46349fbe45 2024-05-13 18:24:33 +08:00
6 changed files with 18 additions and 84 deletions

View File

@ -28,38 +28,6 @@
</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 包安装

View File

@ -1 +1 @@
__version__ = "24.5.15"
__version__ = "24.3.19"

View File

@ -40,13 +40,7 @@ class IQIYI(CheckIn):
if re.findall(r"__dfp=(.*?);", cookie)
else ""
)
__dfp = __dfp.split("@")[0]
qyid = (
re.findall(r"QC005=(.*?);", cookie)[0]
if re.findall(r"QC005=(.*?);", cookie)
else ""
)
return p00001, p00002, p00003, __dfp, qyid
return p00001, p00002, p00003, __dfp
@staticmethod
def user_information(p00001):
@ -82,47 +76,29 @@ class IQIYI(CheckIn):
]
return msg
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):
def sign(self, p00001, p00003):
"""
VIP 签到
"""
qyid = uuid4().hex[:16]
time_stamp = int(time.time() * 1000)
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 = {
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&timestamp={time_stamp}&typeCode=point&userId={p00003}"
body = {
"natural_month_sign": {
"verticalCode": "iQIYI",
"taskCode": "iQIYI_mofhr",
"agentType": 1,
"agentversion": 1,
"authCookie": p00001,
"qyid": qyid,
"agentType": 20,
"agentVersion": "15.4.6",
"dfp": dfp,
"signFrom": 1,
"verticalCode": "iQIYI",
}
}
url = "https://community.iqiyi.com/openApi/task/execute"
res = requests.post(
url=url,
params=sign_date,
data=json.dumps(data),
headers={"Content-Type": "application/json"},
data=json.dumps(body),
headers={"Cookie": f"P00001={p00001}", "Content-Type": "application/json"},
).json()
if res["code"] == "A00000":
_msg = res["data"]["msg"]
@ -431,9 +407,7 @@ class IQIYI(CheckIn):
return [{"name": "白金抽奖", "value": "未中奖"}]
def main(self):
p00001, p00002, p00003, dfp, qyid = self.parse_cookie(
self.check_item.get("cookie")
)
p00001, p00002, p00003, dfp = 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")
@ -443,7 +417,7 @@ class IQIYI(CheckIn):
print(f"获取账号信息失败,错误信息: {e}")
nickname = "未获取到,请检查 Cookie 中 P00002 字段"
user_name = "未获取到,请检查 Cookie 中 P00002 字段"
sign_msg = self.sign(p00001=p00001, p00003=p00003, dfp=dfp, qyid=qyid)
sign_msg = self.sign(p00001=p00001, p00003=p00003)
_user_msg = self.user_information(p00001=p00001)
lotto_lottery_msg = self.lotto_lottery(p00001=p00001)
if _user_msg[4].get("value") != "非 VIP 用户":

View File

@ -1,7 +0,0 @@
# 2024-05-15
![PyPI](https://img.shields.io/badge/Pypi-v24.5.15-brightgreen)
## 🐛 修复
- 修复「爱奇艺」签到失效的问题

View File

@ -1,5 +1,4 @@
{
"2024-05-15": "2024-05-15",
"2024-03-19": "2024-03-19",
"2024-03-11": "2024-03-11",
"2024-03-07": "2024-03-07",

View File

@ -72,13 +72,13 @@ const config: DocsThemeConfig = {
}
},
banner: {
key: '2024.5.15-release',
key: '2024.3.19-release',
text: (
<a
href="/dailycheckin/history/2024-05-15/"
href="/dailycheckin/history/2024-03-19/"
target="_blank"
>
🎉 DailyCheckIn 2024.5.15 is released. Read more
🎉 DailyCheckIn 2024.3.19 is released. Read more
</a>
),
},