zepp life修改微信步数 微信运动怎么刷步数最快( 二 )


response_text = response_result.text
# print('登录状态码:%s' % status_code)
# print('登录返回数据:%s' % response_text)
if status_code == 200:
response_text = json.loads(response_text)
user_id = response_text['data']['userId']
access_token = response_text['data']['accessToken']
return user_id, access_token
else:
return '登录失败'
# 修改步数
def change_step(self):
# 登录结果
login_result = self.login()
if login_result == '登录失败':
return '登录失败'
else:
url = 'https://sports.lifesense.com/sport_service/sport/sport/uploadMobileStepV2?systemType=2&version=4.6.7'
data = https://www.bjxdyg.com/life/{'list': [{'DataSource': 2, 'active': 1, 'calories': int(self.step/4), 'dataSource': 2,
'deviceId': 'M_NULL', 'distance': int(self.step/3), 'exerciseTime': 0, 'isUpload': 0,
'measurementTime': time.strftime('%Y-%m-%d %H:%M:%S'), 'priority': 0, 'step': self.step,
'type': 2, 'updated': int(round(time.time() * 1000)), 'userId': login_result[0]}]}
headers = {
'Content-Type': 'application/json; charset=utf-8',
'Cookie': 'accessToken=%s' % login_result[1]
}
response_result = requests.post(url, data=https://www.bjxdyg.com/life/json.dumps(data), headers=headers)
status_code = response_result.status_code
# response_text = response_result.text
# print('修改步数状态码:%s' % status_code)
# print('修改步数返回数据:%s' % response_text)
if status_code == 200:
return '修改步数为【%s】成功' % self.step
else:
return '修改步数失败'
微信步数实现效果如下:

zepp life修改微信步数 微信运动怎么刷步数最快



支付宝运动实现效果如下:

zepp life修改微信步数 微信运动怎么刷步数最快



更多系列文章
敬请期待
我是CoCo,计算机科学与技术专业,深漂大厂互联网民工(女),坐标深圳 。5年工作经验,3年持续输出技术文 。ITester软件测试小栈(ID:ITestingA)号主,专注于软件测试技术和宝藏干货分享,每周准时更新原创技术文章,每月不定期赠送技术书籍,愿我们在更高处相逢 。喜欢记得星标?我,及时获得最新文章推送,第三方转载请注明出处 。
zepp life修改微信步数 微信运动怎么刷步数最快



zepp life修改微信步数 微信运动怎么刷步数最快


想获取更多最新干货内容
快来星标 置顶 关注我
每周一、三、五 08:30见

推荐阅读