🔨 完善 v2ex 和 weibo cookie 过期日志推送;

This commit is contained in:
Sitoi 2021-04-08 15:27:52 +08:00
parent 9c441c8369
commit e29f0da3c7
19 changed files with 79 additions and 133 deletions

View File

@ -55,13 +55,13 @@
|签到|[天翼云盘](https://cloud.189.cn/)|每日签到+2次抽奖获得空间奖励|每天一次|✔️|
|签到|[WPS](https://www.wps.cn/)|每日签到|每天一次|✔️|
|签到|[吾爱破解](https://www.52pojie.cn/index.php)|2枚吾爱币|每天一次|❗|
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次|✔️|
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次||
|签到|[MEIZU 社区](https://bbs.meizu.cn)|每日签到,可配置抽奖|每天一次|✔️|
|签到|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|每日签到获取积分,积分可兑换物品|每天一次|❌|
|签到|[智友邦](http://zhizhiyoo.net/)|每日签到获取金币|每天一次|✔️|
|签到|[CSDN](https://www.csdn.net/)|每日签到、抽奖|每天一次||
|签到|[CSDN](https://www.csdn.net/)|每日签到、抽奖|每天一次|✔️|
|签到|王者营地|每日签到|每天一次|⭕|
|签到|微博|每日钱包签到、打卡|每天一次||
|签到|微博|每日钱包签到、打卡|每天一次|✔️|
|签到|多看阅读|获取书豆,用于购买书籍|每天一次|✔️|
|签到|芒果 TV|签到获取体验会员|每天一次|✔️|
|签到|联通营业厅|积分+流量奖励|每天一次|✔️|
@ -100,11 +100,11 @@
<details>
<summary>更新日志(点击展开)</summary>
- 2021-04-07
- 2021-04-07
* 添加【王者营地】每日签到脚本
* 添加【CSDN】每日签到脚本
* 添加【AcFun】每日分享任务功能
- 2021-03-30
- 2021-03-30
* 添加【微博】每日签到脚本
* 添加【多看阅读】每日签到脚本
- 2021-03-16 添加【智友邦】每日签到脚本

View File

@ -157,5 +157,5 @@ def get_notice_info(data):
return result
if __name__ == '__main__':
if __name__ == "__main__":
env2config(save_file=True)

View File

@ -45,7 +45,6 @@ curl https://gitee.com/sitoi/dailycheckin/raw/main/docker_start.sh | bash
docker exec dailycheckin python3 index.py
```
##### 更新最新脚本
```bash

View File

@ -329,7 +329,6 @@ CONFIG_JSON
}
```
## 三、Star 一下,立即执行,观察运行情况
点一下自己 fork 项目的 star 立即执行

View File

@ -33,13 +33,13 @@
|签到|[天翼云盘](https://cloud.189.cn/)|每日签到+2次抽奖获得空间奖励|每天一次|✔️|
|签到|[WPS](https://www.wps.cn/)|每日签到|每天一次|✔️|
|签到|[吾爱破解](https://www.52pojie.cn/index.php)|2枚吾爱币|每天一次|❗|
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次|✔️|
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次||
|签到|[MEIZU 社区](https://bbs.meizu.cn)|每日签到,可配置抽奖|每天一次|✔️|
|签到|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|每日签到获取积分,积分可兑换物品|每天一次|❌|
|签到|[智友邦](http://zhizhiyoo.net/)|每日签到获取金币|每天一次|✔️|
|签到|[CSDN](https://www.csdn.net/)|每日签到、抽奖|每天一次||
|签到|[CSDN](https://www.csdn.net/)|每日签到、抽奖|每天一次|✔️|
|签到|王者营地|每日签到|每天一次|⭕|
|签到|微博|每日钱包签到、打卡|每天一次||
|签到|微博|每日钱包签到、打卡|每天一次|✔️|
|签到|多看阅读|获取书豆,用于购买书籍|每天一次|✔️|
|签到|芒果 TV|签到获取体验会员|每天一次|✔️|
|签到|联通营业厅|积分+流量奖励|每天一次|✔️|

View File

@ -105,7 +105,6 @@
5. 选中 `www.iqiyi.com`
6. 下滑找到 `cookie` 全选复制即可
### APP 抓包
#### 芒果 TV 请求参数

View File

@ -36,6 +36,7 @@
![获取 cookie 教程](https://cdn.jsdelivr.net/gh/Sitoi/dailycheckin/docs/img/synology7.jpg)
## 三、回到容器,如图即是运行成功
![获取 cookie 教程](https://cdn.jsdelivr.net/gh/Sitoi/dailycheckin/docs/img/synology8.jpg)
## 四:配置测试

View File

@ -242,30 +242,18 @@ class DuoKanCheckIn:
def info(self, cookies):
url = "https://www.duokan.com/store/v0/award/coin/list"
data = f"sandbox=0&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers,
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
msg = "\n".join([f"{one.get('expire')} 到期,{one.get('coin')} 书豆" for one in result.get("data", {}).get("award")])
return msg
def free(self, cookies):
url = "https://www.duokan.com/hs/v4/channel/query/2027"
response = requests.get(
url=url, cookies=cookies, headers=self.headers
)
response = requests.get(url=url, cookies=cookies, headers=self.headers)
bid = response.json().get("items")[0].get("data").get("book_id")
data = f"payment_name=BC&ch=VSZUVB&book_id={bid}&price=0&allow_discount=1"
free_url = "https://www.duokan.com/store/v0/payment/book/create"
response = requests.post(
url=free_url,
data=data,
cookies=cookies,
headers=self.headers,
)
response = requests.post(url=free_url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
book_title = result.get("book").get("title")
book_msg = result.get("msg")
@ -275,12 +263,7 @@ class DuoKanCheckIn:
def gift(self, cookies):
url = "https://www.duokan.com/events/common_task_gift_check"
data = f"code=KYKJF7LL0G&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
if result.get("chances") == 0:
msg = "体验任务: 已经做完啦"
@ -289,12 +272,7 @@ class DuoKanCheckIn:
for gift_code in self.gift_code_list:
url = "https://www.duokan.com/events/common_task_gift"
data = f"code=KYKJF7LL0G&chances=1&sign={gift_code}&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
if result.get("msg") == "成功":
num += 30
@ -311,12 +289,7 @@ class DuoKanCheckIn:
for one in range(6):
url = "https://www.duokan.com/store/v0/event/chances/add"
data = f"code=8ulcky4bknbe_f&count=1&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
if result.get("result") == 0:
success_count += 1
@ -328,12 +301,7 @@ class DuoKanCheckIn:
for one in range(6):
url = "https://www.duokan.com/store/v0/event/drawing"
data = f"code=8ulcky4bknbe_f&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
if result.get("result") == 0:
success_count += 1
@ -343,12 +311,7 @@ class DuoKanCheckIn:
def download(self, cookies):
url = "https://www.duokan.com/events/common_task_gift"
data = f"code=J18UK6YYAY&chances=17&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
msg = "下载任务: " + result.get("msg")
return msg
@ -358,12 +321,7 @@ class DuoKanCheckIn:
url = "https://www.duokan.com/events/tasks_gift"
for code in self.code_list:
data = f"code={code}&chances=3&{self.get_data(cookies=cookies)}&withid=1"
response = requests.post(
url=url,
data=data,
cookies=cookies,
headers=self.headers
)
response = requests.post(url=url, data=data, cookies=cookies, headers=self.headers)
result = response.json()
if result.get("result") == 0:
success_count += 1
@ -381,8 +339,10 @@ class DuoKanCheckIn:
download_msg = self.download(cookies=duokan_cookie)
task_msg = self.task(cookies=duokan_cookie)
info_msg = self.info(cookies=duokan_cookie)
msg = f"每日签到: {sign_msg}\n{free_msg}\n{gift_msg}\n" \
f"{add_draw_msg}\n{draw_msg}\n{download_msg}\n{task_msg}\n{info_msg}"
msg = (
f"每日签到: {sign_msg}\n{free_msg}\n{gift_msg}\n"
f"{add_draw_msg}\n{draw_msg}\n{download_msg}\n{task_msg}\n{info_msg}"
)
return msg

View File

@ -4,7 +4,7 @@ import os
import time
from datetime import datetime, timedelta
from config import checkin_map, get_checkin_info, get_notice_info, env2config
from config import checkin_map, env2config, get_checkin_info, get_notice_info
from motto import Motto
from utils.message import push_message
@ -27,19 +27,22 @@ def main_handler(event, context):
for one_check, check_tuple in checkin_map.items():
check_name, check_func = check_tuple
if check_info.get(one_check.lower()):
print(f"----------已检测到正确的配置,并开始执行 {one_check} 签到----------")
for check_item in check_info.get(one_check.lower(), []):
print(f"----------已检测到正确的配置,并开始执行【{check_name}】签到----------")
for index, check_item in enumerate(check_info.get(one_check.lower(), [])):
print(f"----------开始执行【{check_name}】签到 : 第 {index + 1} 个账号----------")
if "xxxxxx" not in str(check_item) and "多账号" not in str(check_item):
try:
msg = check_func(check_item).main()
content_list.append(f"{check_name}\n{msg}")
print(f"----------执行完成 【{check_name}】签到 : 第 {index + 1} 个账号----------")
except Exception as e:
content_list.append(f"{check_name}\n{e}")
print(check_name, e)
print(f"----------执行失败 【{check_name}】签到 : 错误日志如下:----------\n{e}")
else:
print(f"检测【{check_name}】脚本到配置文件包含模板配置,进行跳过")
print(f"----------跳过执行【{check_name}】签到 : 配置文件包含自带的默认配置----------")
else:
print(f"----------未检测到正确的配置,并跳过执行 {one_check} 签到----------")
print(f"----------未检测到正确的配置,并跳过执行{check_name}签到----------")
if motto:
try:
msg_list = Motto().main()

View File

@ -116,10 +116,7 @@ class IQIYICheckIn:
params["taskCode"] = item.get("taskCode")
requests.get(url=url, params=params)
elif item["status"] == 4:
requests.get(
url='https://tc.vip.iqiyi.com/taskCenter/task/notify',
params=params
)
requests.get(url="https://tc.vip.iqiyi.com/taskCenter/task/notify", params=params)
params["taskCode"] = item.get("taskCode")
requests.get(url=url, params=params)
elif item["status"] == 1:

View File

@ -244,22 +244,22 @@ class LianTongCheckIn:
def dayoneg(session):
try:
# 观看视频任务
session.post(url='https://act.10010.com/SigninApp/doTask/finishVideo')
session.post(url="https://act.10010.com/SigninApp/doTask/finishVideo")
# 请求任务列表
get_task_info = session.post(url='https://act.10010.com/SigninApp/doTask/getTaskInfo')
get_task_info.encoding = 'utf-8'
get_prize = session.post(url='https://act.10010.com/SigninApp/doTask/getPrize')
get_prize.encoding = 'utf-8'
session.post(url='https://act.10010.com/SigninApp/doTask/getTaskInfo')
get_task_info = session.post(url="https://act.10010.com/SigninApp/doTask/getTaskInfo")
get_task_info.encoding = "utf-8"
get_prize = session.post(url="https://act.10010.com/SigninApp/doTask/getPrize")
get_prize.encoding = "utf-8"
session.post(url="https://act.10010.com/SigninApp/doTask/getTaskInfo")
res1 = get_task_info.json()
res2 = get_prize.json()
if res1['data']['taskInfo']['status'] == '1':
msg = '1G流量日包: ' + res2['data']['statusDesc']
if res1["data"]["taskInfo"]["status"] == "1":
msg = "1G流量日包: " + res2["data"]["statusDesc"]
else:
msg = '1G流量日包: ' + res1['data']['taskInfo']['btn']
msg = "1G流量日包: " + res1["data"]["taskInfo"]["btn"]
time.sleep(1)
except Exception as e:
msg = '1G流量日包: 错误,' + str(e)
msg = "1G流量日包: 错误," + str(e)
return msg
@staticmethod

View File

@ -29,10 +29,7 @@ class MgtvCheckIn:
"uuid": params.get("uuid"),
}
try:
user_info = requests.get(
url="https://homepage.bz.mgtv.com/v2/user/userInfo",
params=user_params
).json()
user_info = requests.get(url="https://homepage.bz.mgtv.com/v2/user/userInfo", params=user_params).json()
username = user_info.get("data", {}).get("nickName")
except Exception as e:
print("获取用户信息失败", e)
@ -56,7 +53,7 @@ class MgtvCheckIn:
return msg
if __name__ == '__main__':
if __name__ == "__main__":
with open(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config/config.json"), "r", encoding="utf-8"
) as f:

View File

@ -1,7 +1,4 @@
# -*- coding: utf-8 -*-
import json
import os
import requests

View File

@ -115,12 +115,7 @@ def message2qywxapp(qywx_corpid, qywx_agentid, qywx_corpsecret, qywx_touser, con
def message2pushplus(pushplus_token, content, pushplus_topic=None):
print("Pushplus 推送开始")
data = {
"token": pushplus_token,
"title": "签到通知",
"content": content.replace("\n", "<br>"),
"template": "json"
}
data = {"token": pushplus_token, "title": "签到通知", "content": content.replace("\n", "<br>"), "template": "json"}
if pushplus_topic:
data["topic"] = pushplus_topic
requests.post(url=f"http://www.pushplus.plus/send", data=json.dumps(data))

View File

@ -24,7 +24,9 @@ class V2exCheckIn:
)
urls = re.findall(pattern=pattern, string=response.text)
url = urls[0] if urls else None
if url != "/balance":
if url is None:
return "cookie 可能过期"
elif url != "/balance":
headers = {"Referer": "https://www.v2ex.com/mission/daily"}
data = {"once": url.split("=")[-1]}
_ = session.get(url="https://www.v2ex.com" + url, verify=False, headers=headers, params=data)

View File

@ -111,8 +111,7 @@ class VQQCheckIn:
sign_once_msg = self.sign_once(headers=headers, cookies=vqq_cookie)
sign_twice_msg = self.sign_twice(headers=headers, cookies=vqq_cookie)
task_msg = self.tasks(headers=headers, cookies=vqq_cookie)
msg = f"用户信息: {nick}\n签到奖励1: {sign_once_msg}\n" \
f"签到奖励2: {sign_twice_msg}\n{task_msg}"
msg = f"用户信息: {nick}\n签到奖励1: {sign_once_msg}\n签到奖励2: {sign_twice_msg}\n{task_msg}"
return msg

View File

@ -60,19 +60,23 @@ class WeiBoCheckIn:
response = requests.post(
url=f"https://pay.sc.weibo.com/aj/mobile/home/welfare/signin/do", headers=headers, data=data, verify=False
)
result = response.json()
if result.get("status") == 1:
msg = f'微博钱包: {result.get("score")} 积分'
elif result.get("status") == 2:
msg = f"微博钱包: 已签到"
info_response = requests.post(
url="https://pay.sc.weibo.com/api/client/sdk/app/balance", headers=headers, data=data
)
info_result = info_response.json()
msg += f"\n当前现金: {info_result.get('data').get('balance')}"
else:
try:
result = response.json()
if result.get("status") == 1:
msg = f'微博钱包: {result.get("score")} 积分'
elif result.get("status") == 2:
msg = f"微博钱包: 已签到"
info_response = requests.post(
url="https://pay.sc.weibo.com/api/client/sdk/app/balance", headers=headers, data=data
)
info_result = info_response.json()
msg += f"\n当前现金: {info_result.get('data').get('balance')}"
else:
msg = f"微博钱包: Cookie失效"
return msg
except Exception as e:
msg = f"微博钱包: Cookie失效"
return msg
return msg
def main(self):
weibo_show_url = self.check_item.get("weibo_show_url")

View File

@ -322,10 +322,7 @@ class WPSCheckIn:
miniprogram_sign_msg = self.miniprogram_sign(session=session, sid=sid)
user_info_msg, userid = self.user_info(session=session, sid=sid)
miniprogram_invite_msg = self.miniprogram_invite(session=session, invite_userid=userid)
msg = (
f"{user_info_msg}\n{web_sign_msg}\n{docer_sign_msg}\n{miniprogram_sign_msg}"
f"\n{miniprogram_invite_msg}"
)
msg = f"{user_info_msg}\n{web_sign_msg}\n{docer_sign_msg}\n{miniprogram_sign_msg}\n{miniprogram_invite_msg}"
return msg

View File

@ -19,15 +19,12 @@ class ZhiyooCheckIn:
response = session.get(url="http://bbs.zhiyoo.net/plugin.php?id=dsu_paulsign:sign", verify=False)
formhash = re.findall(r'<input type="hidden" name="formhash" value="(.*?)"', response.text)[0]
params = (
('id', 'dsu_paulsign:sign'),
('operation', 'qiandao'),
('infloat', '1'),
('inajax', '1'),
("id", "dsu_paulsign:sign"),
("operation", "qiandao"),
("infloat", "1"),
("inajax", "1"),
)
data = {
'formhash': formhash,
'qdxq': 'kx'
}
data = {"formhash": formhash, "qdxq": "kx"}
response = session.post(url="http://bbs.zhiyoo.net/plugin.php", params=params, data=data, verify=False)
user_rep = session.get(url="http://bbs.zhiyoo.net/home.php")
uid = re.findall(r"uid=(\d+)\"", user_rep.text)
@ -35,7 +32,7 @@ class ZhiyooCheckIn:
if "今日已经签到" in response.text:
msg = f"用户信息: {uid}\n签到信息: 您今日已经签到,请明天再来!"
else:
check_msg = re.findall(r'恭喜你签到成功!获得随机奖励 金币 (\d+) 元.', response.text, re.S)
check_msg = re.findall(r"恭喜你签到成功!获得随机奖励 金币 (\d+) 元.", response.text, re.S)
check_msg = check_msg[0].strip() if check_msg else "签到失败"
msg = f"用户信息: {uid}\n签到信息: 恭喜你签到成功!获得随机奖励 金币 {check_msg} 元."
return msg
@ -48,12 +45,12 @@ class ZhiyooCheckIn:
requests.utils.add_dict_to_cookiejar(session.cookies, zhiyoo_cookie)
session.headers.update(
{
'Origin': 'http://bbs.zhiyoo.net',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.54',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Referer': 'http://bbs.zhiyoo.net/plugin.php?id=dsu_paulsign:sign',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
"Origin": "http://bbs.zhiyoo.net",
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.54",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Referer": "http://bbs.zhiyoo.net/plugin.php?id=dsu_paulsign:sign",
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
}
)
msg = self.sign(session=session)