1 Star 0 Fork 4

ITCrowed/自用青龙脚本库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
yys.py 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
# coding=utf-8
"""
每日8点
cron: 0 0 8 * * ?
new Env("药研社")
"""
import requests
import notify
import utils.tool as TOOL
import utils.getCookie as getCookie
global msg
msg = """
名称|今日|总研值
:--:|:--:|:--:
"""
def main():
users = getCookie.GetQlEnvs().getCookies('YYS_TOKEN')
print("🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉\n")
print("获取到: "+str(len(users))+" 个用户")
print("-------------------------------------------")
for user in users:
signIn(user)
# 签到
def signIn(user):
global msg
url = "https://m.yaoyanshe.com/web-api/mdUser/v2/sign"
headers = {
"Host": "m.yaoyanshe.com",
"Connection": "keep-alive",
"accessToken": user['cookie'],
"app-key": "MODULE_YYS_H5_201903161",
"version": "3.9.4",
"app-type": "",
"User-Agent": "Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36",
"Accept": "application/json, text/plain, */*",
"sign": "16892536F31504A9874AE85846B741D6",
"product-code": "yys-h5",
"devcie": "iOS",
"app-version": "3.9.4",
"X-Requested-With": "com.healthmudi.dia",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Referer": "https://m.yaoyanshe.com/h/fs/sign_in",
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"
}
res = requests.get(url=url, headers= headers)
json = res.json()
if json['status'] != 0:
print(user['name'] + " ---> " + "今日签到研值: " +
str(json['subMessage']) + " 总研值: " + str(json['subMessage']))
msg += user['name'] + "|" + "失效" + "|" + "失效" + "\n\n"
return
oneDayReward = json['data']['oneDayReward']
# 签到成功 获取 药研值
url = "https://yys.yaoyanshe.com/app-api/mdUserPoints/getUserPoints"
res = requests.get(url=url, headers=headers)
json = res.json()
allDayReward = json['data']
print(user['name'] + " ---> " + "今日签到研值: " +
str(oneDayReward) + " 总研值: " + str(allDayReward))
print("-------------------------------------------")
msg += user['name'] + "|" + \
str(oneDayReward)+"|"+str(allDayReward)+"\n\n"
main()
print("\n🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉")
notify.send("药研社", msg)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/AxesJonney/ql.git
git@gitee.com:AxesJonney/ql.git
AxesJonney
ql
自用青龙脚本库
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385