1.前往腾讯云注册账号 点击前往
2.前往腾讯云的云函数控制台 点击前往
3. 密码md5加密 点击前往
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.将上面的代码粘贴进来
6.修改执行超时时间
7. 查看运行结果
8. 配置每天运行时间
配置完成 每天早上9点就会自动签到了
项目地址
https://github.com/Binaryify/NeteaseCloudMusicApi
Q.E.D.