其实原理很简单,调用aligo的库就行,下面是python代码,flask代码的话,自己悟
from aligo import Aligo
from aligo import Auth
Auth._EMAIL_HOST = 'smtp.qq.com'
Auth._EMAIL_PORT = '465'
Auth._EMAIL_USER = '你的QQ邮箱账号'
Auth._EMAIL_PASSWORD = '邮箱的SMTP授权码'
if __name__ == '__main__':
email_data = '接受二维码登录的邮箱'
ali = Aligo(email=(email_data, '防伪字符串,可任意字符串'), name="用户名(用于区分账号)")
r = ali._post('/v1/activity/sign_in_list', host='https://member.aliyundrive.com', body={})
result = r.json()['result']
signInCount = result['signInCount']
signInLog = next(filter(lambda i: i['day'] == signInCount, result['signInLogs']), None)
if signInLog:
if signInLog['reward'] is None:
print("本月签到次数:" + str(signInCount) + ",今日签到无奖励")
else:
print("本月签到次数:" + str(signInCount) + ",今日签到奖励:" + signInLog['reward']['name'] +
signInLog['reward']['description'])
else:
print("签到失败")
© 版权声明
本文文章版权归作者所有,未经允许请勿转载
该作者文章如有侵权,请附相关信息发送到邮箱:515517983@qq.com
本站微信小程序:云村Study
THE END
请登录后查看评论内容