代码拉取完成,页面将自动刷新
同步操作将从 青铜少年/自用青龙脚本库 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# coding=utf-8
"""
cron: 0 0 6 * * ?
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('YDYBJ_COOKIE')
print("🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉\n")
print("获取到: "+str(len(users))+" 个用户")
print("-------------------------------------------")
for user in users:
signIn(user)
# 签到
def signIn(user):
global msg
ad = 0
payload = 'yaohuo:id34976'
headers = {'Cookie': user['cookie']}
re = requests.request(
"POST", "https://note.youdao.com/yws/api/daupromotion?method=sync", headers=headers, data=payload)
if 'error' not in re.text:
res = requests.request(
"POST", "https://note.youdao.com/yws/mapi/user?method=checkin", headers=headers, data=payload)
for i in range(3):
resp = requests.request(
"POST", "https://note.youdao.com/yws/mapi/user?method=adRandomPrompt", headers=headers, data=payload)
ad += resp.json()['space'] // 1048576
if 'reward' in re.text:
sync = re.json()['rewardSpace'] // 1048576
checkin = res.json()['space'] // 1048576
# 签到成功
print(user['name'] + " ---> " +
str(sync + checkin + ad) + 'M\n')
msg += user['name'] + "|" + \
str(sync + checkin + ad) + 'M\n\n'
else:
print(user['name'] + " ---> " + 'cookie失效\n')
msg += user['name'] + "|cookie失效\n\n"
print("-------------------------------------------")
main()
print("\n🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉")
notify.send("有道云笔记", msg)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。