前言
为了实现微信、支付宝等刷步数的功能,借用了小米运动的第三方接口,使用python模拟登录,再去伪造步数数据。
在小米运动中开启多端同步,数据上传后即会产生对应的同步
代码编写
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| import requests import random import re import time
headers = { 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 9; MI 6 MIUI/20.6.18)' }
def login(user, pwd): global code url1 = "https://api-user.huami.com/registrations/+86" + user + "/tokens" headers_login = { "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "User-Agent": "MiFit/4.6.0 (iPhone; iOS 14.0.1; Scale/2.00)" } data1 = { "client_id": "HuaMi", "password": pwd, "redirect_uri": "https://s3-us-west-2.amazonaws.com/hm-registration/successsignin.html", "token": "access" }
|