阿里网盘自动签到Python代码

其实原理很简单,调用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("签到失败")

图片[1]-阿里网盘自动签到Python代码-云村Study

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    请登录后查看评论内容