添加【智友邦】签到脚本

This commit is contained in:
Sitoi 2021-03-16 10:16:35 +08:00
parent 7af4df6926
commit 968315fa2b
11 changed files with 99 additions and 107 deletions

View File

@ -82,6 +82,7 @@ jobs:
PICACOMIC_ACCOUNT_LIST: ${{secrets.PICACOMIC_ACCOUNT_LIST}}
MEIZU_COOKIE_LIST: ${{secrets.MEIZU_COOKIE_LIST}}
CAIYUN_COOKIE_LIST: ${{secrets.CAIYUN_COOKIE_LIST}}
ZHIYOO_COOKIE_LIST: ${{secrets.ZHIYOO_COOKIE_LIST}}
- name: "部署到腾讯云函数"
run: sls deploy --debug

View File

@ -70,4 +70,5 @@ jobs:
MGTV_PARAMS_LIST: ${{secrets.MGTV_PARAMS_LIST}}
PICACOMIC_ACCOUNT_LIST: ${{secrets.PICACOMIC_ACCOUNT_LIST}}
MEIZU_COOKIE_LIST: ${{secrets.MEIZU_COOKIE_LIST}}
CAIYUN_COOKIE_LIST: ${{secrets.CAIYUN_COOKIE_LIST}}
CAIYUN_COOKIE_LIST: ${{secrets.CAIYUN_COOKIE_LIST}}
ZHIYOO_COOKIE_LIST: ${{secrets.ZHIYOO_COOKIE_LIST}}

View File

@ -58,6 +58,7 @@
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次|✔️|
|签到|[MEIZU 社区](https://bbs.meizu.cn)|每日签到,可配置抽奖|每天一次|✔️|
|签到|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|每日签到获取积分,积分可兑换物品|每天一次|❌|
|签到|[智友邦](http://zhizhiyoo.net/)|每日签到获取金币|每天一次|❓|
|签到|芒果 TV|签到获取体验会员|每天一次|✔️|
|签到|联通营业厅|积分+流量奖励|每天一次|✔️|
|签到|Fa米家 APP|连续签到7天总计获得6粒Fa米粒每月15号23.59分清空Fa米粒。理论一个月最少获得24粒fa米粒。|每天一次|✔️|
@ -92,8 +93,9 @@
## 其他
<details>
<summary>更新日志</summary>
<summary>更新日志(点击展开)</summary>
- 2021-03-16 添加【智友邦】每日签到脚本
- 2021-03-10 添加【爱奇艺】10s 任务
- 2021-03-09
* 添加【pushplus】推送功能
@ -140,7 +142,7 @@
</details>
<details>
<summary>TODO</summary>
<summary>TODO(点击展开)</summary>
- 【爱奇艺】观看时长任务
- 【和彩云】签到脚本修复
@ -153,6 +155,3 @@
<p align="center">
<a href="https://starchart.cc/Sitoi/dailycheckin"><img src="https://starchart.cc/Sitoi/dailycheckin.svg" alt="starchart"></a>
</p>

View File

@ -27,6 +27,7 @@ from wps import WPSCheckIn
from www2nzz import WWW2nzzCheckIn
from xmly import XMLYCheckIn
from youdao import YouDaoCheckIn
from zhiyoo import ZhiyooCheckIn
checkin_map = {
"IQIYI_COOKIE_LIST": ("爱奇艺", IQIYICheckIn),
@ -52,6 +53,7 @@ checkin_map = {
"MEIZU_COOKIE_LIST": ("MEIZU社区", MeizuCheckIn),
"PICACOMIC_ACCOUNT_LIST": ("哔咔漫画", PicacomicCheckIn),
"CAIYUN_COOKIE_LIST": ("和彩云", CaiYunCheckIn),
"ZHIYOO_COOKIE_LIST": ("智友邦", ZhiyooCheckIn),
"CITY_NAME_LIST": ("天气预报", Weather),
"XMLY_COOKIE_LIST": ("喜马拉雅极速版", XMLYCheckIn),
}

View File

@ -250,5 +250,13 @@
"caiyun_referer": "多账号 请求重定向地址,填写,请参考上面,以实际获取为准",
"caiyun_draw": "多账号 是否开启抽奖,填写 true or false 去掉双引号"
}
],
"ZHIYOO_COOKIE_LIST": [
{
"zhiyoo_cookie": "ikdQ_9242_saltkey=xxxxxx; ikdQ_9242_lastvisit=xxxxxx; ikdQ_9242_onlineusernum=xxxxxx; ikdQ_9242_sendmail=1; ikdQ_9242_seccode=xxxxxx; ikdQ_9242_ulastactivity=xxxxxx; ikdQ_9242_auth=xxxxxx; ikdQ_9242_connect_is_bind=xxxxxx; ikdQ_9242_nofavfid=xxxxxx; ikdQ_9242_checkpm=xxxxxx; ikdQ_9242_noticeTitle=1; ikdQ_9242_sid=xxxxxx; ikdQ_9242_lip=xxxxxx; ikdQ_9242_lastact=xxxxxx"
},
{
"zhiyoo_cookie": "多账号 cookie 填写请参考上面cookie 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)"
}
]
}

100
deploy.sh
View File

@ -1,100 +0,0 @@
#!/bin/bash
if [[ $DINGTALK_SECRET ]]; then echo "DINGTALK_SECRET 变量存在,并成功赋值" ;else DINGTALK_SECRET="";fi;
if [[ $DINGTALK_ACCESS_TOKEN ]]; then echo "DINGTALK_ACCESS_TOKEN 变量存在,并成功赋值" ;else DINGTALK_ACCESS_TOKEN=""; fi;
if [[ $SCKEY ]]; then echo "SCKEY 变量存在,并成功赋值" ;else SCKEY=""; fi;
if [[ $SENDKEY ]]; then echo "SENDKEY 变量存在,并成功赋值" ;else SENDKEY=""; fi;
if [[ $BARK_URL ]]; then echo "BARK_URL 变量存在,并成功赋值" ;else BARK_URL=""; fi;
if [[ $QMSG_KEY ]]; then echo "QMSG_KEY 变量存在,并成功赋值" ;else QMSG_KEY=""; fi;
if [[ $QMSG_TYPE ]]; then echo "QMSG_TYPE 变量存在,并成功赋值" ;else QMSG_TYPE=""; fi;
if [[ $TG_BOT_TOKEN ]]; then echo "TG_BOT_TOKEN 变量存在,并成功赋值" ;else TG_BOT_TOKEN=""; fi;
if [[ $TG_USER_ID ]]; then echo "TG_USER_ID 变量存在,并成功赋值" ;else TG_USER_ID=""; fi;
if [[ $COOLPUSHSKEY ]]; then echo "COOLPUSHSKEY 变量存在,并成功赋值" ;else COOLPUSHSKEY=""; fi;
if [[ $COOLPUSHQQ ]]; then echo "COOLPUSHQQ 变量存在,并成功赋值" ;else COOLPUSHQQ=true; fi;
if [[ $COOLPUSHWX ]]; then echo "COOLPUSHWX 变量存在,并成功赋值" ;else COOLPUSHWX=false; fi;
if [[ $COOLPUSHEMAIL ]]; then echo "COOLPUSHEMAIL 变量存在,并成功赋值" ;else COOLPUSHEMAIL=false; fi;
if [[ $QYWX_KEY ]]; then echo "QYWX_KEY 变量存在,并成功赋值" ;else QYWX_KEY=""; fi;
if [[ $QYWX_CORPID ]]; then echo "QYWX_CORPID 变量存在,并成功赋值" ;else QYWX_CORPID=""; fi;
if [[ $QYWX_AGENTID ]]; then echo "QYWX_AGENTID 变量存在,并成功赋值" ;else QYWX_AGENTID=""; fi;
if [[ $QYWX_CORPSECRET ]]; then echo "QYWX_CORPSECRET 变量存在,并成功赋值" ;else QYWX_CORPSECRET=""; fi;
if [[ $QYWX_TOUSER ]]; then echo "QYWX_TOUSER 变量存在,并成功赋值" ;else QYWX_TOUSER=""; fi;
if [[ $PUSHPLUS_TOKEN ]]; then echo "PUSHPLUS_TOKEN 变量存在,并成功赋值" ;else PUSHPLUS_TOKEN=""; fi;
if [[ $PUSHPLUS_TOPIC ]]; then echo "PUSHPLUS_TOPIC 变量存在,并成功赋值" ;else PUSHPLUS_TOPIC=""; fi;
if [[ $IQIYI_COOKIE_LIST ]]; then echo "IQIYI_COOKIE_LIST 变量存在,并成功赋值" ;else IQIYI_COOKIE_LIST=[]; fi;
if [[ $VQQ_COOKIE_LIST ]]; then echo "VQQ_COOKIE_LIST 变量存在,并成功赋值" ;else VQQ_COOKIE_LIST=[]; fi;
if [[ $YOUDAO_COOKIE_LIST ]]; then echo "YOUDAO_COOKIE_LIST 变量存在,并成功赋值" ;else YOUDAO_COOKIE_LIST=[]; fi;
if [[ $KGQQ_COOKIE_LIST ]]; then echo "KGQQ_COOKIE_LIST 变量存在,并成功赋值" ;else KGQQ_COOKIE_LIST=[]; fi;
if [[ $MUSIC163_ACCOUNT_LIST ]]; then echo "MUSIC163_ACCOUNT_LIST 变量存在,并成功赋值" ;else MUSIC163_ACCOUNT_LIST=[]; fi;
if [[ $BAIDU_URL_SUBMIT_LIST ]]; then echo "BAIDU_URL_SUBMIT_LIST 变量存在,并成功赋值" ;else BAIDU_URL_SUBMIT_LIST=[]; fi;
if [[ $CITY_NAME_LIST ]]; then echo "CITY_NAME_LIST 变量存在,并成功赋值" ;else CITY_NAME_LIST=[]; fi;
if [[ $MOTTO ]]; then echo "MOTTO 变量存在,并成功赋值" ;else MOTTO=false; fi;
if [[ $XMLY_COOKIE_LIST ]]; then echo "XMLY_COOKIE_LIST 变量存在,并成功赋值" ;else XMLY_COOKIE_LIST=[]; fi;
if [[ $ONEPLUSBBS_COOKIE_LIST ]]; then echo "ONEPLUSBBS_COOKIE_LIST 变量存在,并成功赋值" ;else ONEPLUSBBS_COOKIE_LIST=[]; fi;
if [[ $FMAPP_ACCOUNT_LIST ]]; then echo "FMAPP_ACCOUNT_LIST 变量存在,并成功赋值" ;else FMAPP_ACCOUNT_LIST=[]; fi;
if [[ $TIEBA_COOKIE_LIST ]]; then echo "TIEBA_COOKIE_LIST 变量存在,并成功赋值" ;else TIEBA_COOKIE_LIST=[]; fi;
if [[ $BILIBILI_COOKIE_LIST ]]; then echo "BILIBILI_COOKIE_LIST 变量存在,并成功赋值" ;else BILIBILI_COOKIE_LIST=[]; fi;
if [[ $LIANTONG_ACCOUNT_LIST ]]; then echo "LIANTONG_ACCOUNT_LIST 变量存在,并成功赋值" ;else LIANTONG_ACCOUNT_LIST=[]; fi;
if [[ $V2EX_COOKIE_LIST ]]; then echo "V2EX_COOKIE_LIST 变量存在,并成功赋值" ;else V2EX_COOKIE_LIST=[]; fi;
if [[ $WWW2NZZ_COOKIE_LIST ]]; then echo "WWW2NZZ_COOKIE_LIST 变量存在,并成功赋值" ;else WWW2NZZ_COOKIE_LIST=[]; fi;
if [[ $SMZDM_COOKIE_LIST ]]; then echo "SMZDM_COOKIE_LIST 变量存在,并成功赋值" ;else SMZDM_COOKIE_LIST=[]; fi;
if [[ $MIMOTION_ACCOUNT_LIST ]]; then echo "MIMOTION_ACCOUNT_LIST 变量存在,并成功赋值" ;else MIMOTION_ACCOUNT_LIST=[]; fi;
if [[ $ACFUN_ACCOUNT_LIST ]]; then echo "ACFUN_ACCOUNT_LIST 变量存在,并成功赋值" ;else ACFUN_ACCOUNT_LIST=[]; fi;
if [[ $WPS_COOKIE_LIST ]]; then echo "WPS_COOKIE_LIST 变量存在,并成功赋值" ;else WPS_COOKIE_LIST=[]; fi;
if [[ $POJIE_COOKIE_LIST ]]; then echo "POJIE_COOKIE_LIST 变量存在,并成功赋值" ;else POJIE_COOKIE_LIST=[]; fi;
if [[ $MGTV_PARAMS_LIST ]]; then echo "MGTV_PARAMS_LIST 变量存在,并成功赋值" ;else MGTV_PARAMS_LIST=[]; fi;
if [[ $PICACOMIC_ACCOUNT_LIST ]]; then echo "PICACOMIC_ACCOUNT_LIST 变量存在,并成功赋值" ;else PICACOMIC_ACCOUNT_LIST=[]; fi;
if [[ $MEIZU_COOKIE_LIST ]]; then echo "MEIZU_COOKIE_LIST 变量存在,并成功赋值" ;else MEIZU_COOKIE_LIST=[]; fi;
if [[ $CLOUD189_ACCOUNT_LIST ]]; then echo "CLOUD189_ACCOUNT_LIST 变量存在,并成功赋值" ;else CLOUD189_ACCOUNT_LIST=[]; fi;
if [[ $CAIYUN_COOKIE_LIST ]]; then echo "CAIYUN_COOKIE_LIST 变量存在,并成功赋值" ;else CAIYUN_COOKIE_LIST=[]; fi;
JSONSTR="{
\"DINGTALK_SECRET\": \"${DINGTALK_SECRET}\",
\"DINGTALK_ACCESS_TOKEN\": \"${DINGTALK_ACCESS_TOKEN}\",
\"SCKEY\": \"${SCKEY}\",
\"SENDKEY\": \"${SENDKEY}\",
\"BARK_URL\": \"${BARK_URL}\",
\"QMSG_KEY\": \"${QMSG_KEY}\",
\"QMSG_TYPE\": \"${QMSG_TYPE}\",
\"TG_BOT_TOKEN\": \"${TG_BOT_TOKEN}\",
\"TG_USER_ID\": \"${TG_USER_ID}\",
\"COOLPUSHSKEY\": \"${COOLPUSHSKEY}\",
\"COOLPUSHQQ\": ${COOLPUSHQQ},
\"COOLPUSHWX\": ${COOLPUSHWX},
\"COOLPUSHEMAIL\": ${COOLPUSHEMAIL},
\"QYWX_KEY\": \"${QYWX_KEY}\",
\"QYWX_CORPID\": \"${QYWX_CORPID}\",
\"QYWX_AGENTID\": \"${QYWX_AGENTID}\",
\"QYWX_CORPSECRET\": \"${QYWX_CORPSECRET}\",
\"QYWX_TOUSER\": \"${QYWX_TOUSER}\",
\"PUSHPLUS_TOKEN\": \"${PUSHPLUS_TOKEN}\",
\"PUSHPLUS_TOPIC\": \"${PUSHPLUS_TOPIC}\",
\"CITY_NAME_LIST\": ${CITY_NAME_LIST},
\"MOTTO\": ${MOTTO},
\"IQIYI_COOKIE_LIST\": ${IQIYI_COOKIE_LIST},
\"VQQ_COOKIE_LIST\": ${VQQ_COOKIE_LIST},
\"YOUDAO_COOKIE_LIST\": ${YOUDAO_COOKIE_LIST},
\"KGQQ_COOKIE_LIST\": ${KGQQ_COOKIE_LIST},
\"MUSIC163_ACCOUNT_LIST\": ${MUSIC163_ACCOUNT_LIST},
\"XMLY_COOKIE_LIST\": ${XMLY_COOKIE_LIST},
\"ONEPLUSBBS_COOKIE_LIST\": ${ONEPLUSBBS_COOKIE_LIST},
\"FMAPP_ACCOUNT_LIST\": ${FMAPP_ACCOUNT_LIST},
\"BAIDU_URL_SUBMIT_LIST\": ${BAIDU_URL_SUBMIT_LIST},
\"BILIBILI_COOKIE_LIST\": ${BILIBILI_COOKIE_LIST},
\"LIANTONG_ACCOUNT_LIST\": ${LIANTONG_ACCOUNT_LIST},
\"V2EX_COOKIE_LIST\": ${V2EX_COOKIE_LIST},
\"WWW2NZZ_COOKIE_LIST\": ${WWW2NZZ_COOKIE_LIST},
\"SMZDM_COOKIE_LIST\": ${SMZDM_COOKIE_LIST},
\"MIMOTION_ACCOUNT_LIST\": ${MIMOTION_ACCOUNT_LIST},
\"ACFUN_ACCOUNT_LIST\": ${ACFUN_ACCOUNT_LIST},
\"CLOUD189_ACCOUNT_LIST\": ${CLOUD189_ACCOUNT_LIST},
\"WPS_COOKIE_LIST\": ${WPS_COOKIE_LIST},
\"POJIE_COOKIE_LIST\": ${POJIE_COOKIE_LIST},
\"MGTV_PARAMS_LIST\": ${MGTV_PARAMS_LIST},
\"PICACOMIC_ACCOUNT_LIST\": ${PICACOMIC_ACCOUNT_LIST},
\"MEIZU_COOKIE_LIST\": ${MEIZU_COOKIE_LIST},
\"CAIYUN_COOKIE_LIST\": ${CAIYUN_COOKIE_LIST},
\"TIEBA_COOKIE_LIST\": ${TIEBA_COOKIE_LIST}
}"
echo $JSONSTR > config/config.json
cat config/config.json

View File

@ -6,7 +6,7 @@ mkdir -p config
echo "下载渲染 config 文件的脚本,并执行渲染"
curl https://raw.githubusercontent.com/Sitoi/dailycheckin/main/deploy.sh | bash
curl https://raw.githubusercontent.com/Sitoi/dailycheckin/main/config/config.template.json -o config.json
docker --version
if [ $? -ne 0 ];then

View File

@ -36,6 +36,7 @@
|签到|[哔咔漫画](https://www.picacomic.com)|成长值奖励|每天一次|✔️|
|签到|[MEIZU 社区](https://bbs.meizu.cn)|每日签到,可配置抽奖|每天一次|✔️|
|签到|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|每日签到获取积分,积分可兑换物品|每天一次|❌|
|签到|[智友邦](http://zhizhiyoo.net/)|每日签到获取金币|每天一次|❓|
|签到|芒果 TV|签到获取体验会员|每天一次|✔️|
|签到|联通营业厅|积分+流量奖励|每天一次|✔️|
|签到|Fa米家 APP|连续签到7天总计获得6粒Fa米粒每月15号23.59分清空Fa米粒。理论一个月最少获得24粒fa米粒。|每天一次|✔️|

View File

@ -58,6 +58,7 @@
|_**CAIYUN_COOKIE_LIST**_.caiyun_cookie|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|Web| 和彩云 cookie|
|_**CAIYUN_COOKIE_LIST**_.caiyun_referer|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|Web| 和彩云 referer|
|_**CAIYUN_COOKIE_LIST**_.caiyun_draw|[和彩云](https://caiyun.feixin.10086.cn:7071/portal/newsignin/index.jsp)|Web| 和彩云 是否开启抽奖|
|_**ZHIYOO_COOKIE_LIST**_.zhiyoo_cookie|[智友邦](http://zhizhiyoo.net/)|Web| 智友邦 WEB Cookie|
### APP 签到配置
@ -427,6 +428,14 @@
"caiyun_referer": "多账号 请求重定向地址,填写,请参考上面,以实际获取为准",
"caiyun_draw": "多账号 是否开启抽奖,填写 true or false 去掉双引号"
}
],
"ZHIYOO_COOKIE_LIST": [
{
"zhiyoo_cookie": "ikdQ_9242_saltkey=xxxxxx; ikdQ_9242_lastvisit=xxxxxx; ikdQ_9242_onlineusernum=xxxxxx; ikdQ_9242_sendmail=1; ikdQ_9242_seccode=xxxxxx; ikdQ_9242_ulastactivity=xxxxxx; ikdQ_9242_auth=xxxxxx; ikdQ_9242_connect_is_bind=xxxxxx; ikdQ_9242_nofavfid=xxxxxx; ikdQ_9242_checkpm=xxxxxx; ikdQ_9242_noticeTitle=1; ikdQ_9242_sid=xxxxxx; ikdQ_9242_lip=xxxxxx; ikdQ_9242_lastact=xxxxxx"
},
{
"zhiyoo_cookie": "多账号 cookie 填写请参考上面cookie 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)"
}
]
}
```

2
zhiyoo/__init__.py Normal file
View File

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from zhiyoo.zhiyoo import ZhiyooCheckIn

69
zhiyoo/zhiyoo.py Normal file
View File

@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
import json
import os
import re
import requests
import urllib3
from requests import utils
urllib3.disable_warnings()
class ZhiyooCheckIn:
def __init__(self, check_item):
self.check_item = check_item
@staticmethod
def sign(session):
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'),
)
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)
uid = uid[0] if uid else "未获取到 UID"
if "今日已经签到" in response.text:
msg = f"用户信息: {uid}\n签到信息: 您今日已经签到,请明天再来!"
else:
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
def main(self):
zhiyoo_cookie = {
item.split("=")[0]: item.split("=")[1] for item in self.check_item.get("zhiyoo_cookie").split("; ")
}
session = requests.session()
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',
}
)
msg = self.sign(session=session)
return msg
if __name__ == "__main__":
with open(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config/config.json"), "r", encoding="utf-8"
) as f:
datas = json.loads(f.read())
_check_item = datas.get("ZHIYOO_COOKIE_LIST", [])[0]
print(ZhiyooCheckIn(check_item=_check_item).main())