原创文|Space9
记录美好时光 分享快乐那一刻
使用方法
使用华为云的函数工作流(FunctionGraph)来完成每日签到。具体的部署教程可参见:天翼云盘每天自动签到抽奖领空间 每月至少扩容3G+
配置区别
- 函数名称:photo_checkin
- 环境变量:code、phone、pwd (中文解释:国际区号、手机号、密码),注意国际区号前不要填+号
- 执行超时时间(秒):6
源码
MyPhoto.py
# -*- coding:utf-8 -*-
import hashlib
import json
import random
import time
import requests
def encrypt_pwd(password):
str_temp = f"tc.everphoto.{password}"
str_md5 = hashlib.md5(str_temp.encode()).hexdigest()
return str_md5
def login(country_code, phone, password):
mobile = f"+{country_code}{phone}"
pwd = encrypt_pwd(password)
url = "https://api.everphoto.cn/auth"
timestamp_ms = str(round(time.time() * 1000))
payload = {
'mobile': mobile,
'password': pwd
}
headers = {
'Host': 'api.everphoto.cn',
'x-api-version': '20161221',
'user-agent': 'EverPhoto/2.7.9.1 (Android;2791;Pro 7;23;tengxun_33_1)',
'x-device-mac': '02:00:00:00:00:00',