1.前往腾讯云注册账号 点击前往

2.前往腾讯云的云函数控制台 点击前往

wyydk1.png

wyydk2.png

3. 密码md5加密 点击前往

QQ截图20210319093134

4. 复制以下代码 粘贴进去

一定要修改 手机号码 和 密码md5(就是上面那个加密)

import requests
import json
import time

loginCookies = {
        'phone': '135xxxx0611', # 改成你的手机号码
        'md5_password': '73853bae43xxxxxxxxxxxxxxe8c3d532', # 改成你的密码的md5
    }

def getTime():
    return str(int(round(time.time() * 1000)))

def sign():
    # 登录
    res = requests.post('https://lwg-wyy.vercel.app/login/cellphone?timestamp=' + getTime(), loginCookies)
    # print(res.text)
    j = json.loads(res.text)

    cookies = {
        'cookie': j['cookie'],
        'type': 0
    }
    # 手机签到
    res2 = requests.post('https://lwg-wyy.vercel.app/daily_signin?timestamp=' + getTime(), cookies)
    print(res2.text)
    time.sleep(1)

    cookies['type'] = 1
    # PC签到
    res2 = requests.post('https://lwg-wyy.vercel.app/daily_signin?timestamp=' + getTime(), cookies)
    print(res2.text)

    # 退出登录
    requests.post('https://lwg-wyy.vercel.app/logout?timestamp=' + getTime(), cookies)

def main_handler(a, b):
    # 手机、pc 双端签到
    sign()

5.将上面的代码粘贴进来

wyydk4.png

6.修改执行超时时间

QQ截图20210310104512

7. 查看运行结果

wyy-dk-5

8. 配置每天运行时间

wyy-dk-6

配置完成 每天早上9点就会自动签到了

项目地址

https://github.com/Binaryify/NeteaseCloudMusicApi

Q.E.D.