Giter VIP home page Giter VIP logo

changewechatsport's Introduction

修改微信运动步数

通过Github Action/阿里云/Google Colab使用 Zepp Life app(小米运动app)修改微信步数,Github Action 可设置每日定时执行。

2022.8.18亲测成功:ghost:

修改微信步数

目录

准备工作

使用本仓库需要 Zepp Life app(原小米运动app),请务必把 Zepp Life 注册好,设置好,与微信的同步/第三方接入什么的都弄好再往下看

回到顶部

使用指南

通过GithubAction

  1. Fork 本仓库
  2. 在你自己 Fork 的仓库进行设置Settings - Actions - General - Allow all actions and reusable workflows,别忘了save
  3. 然后Settings - Secrets - Actions - New repository secret,按下面例子新建几个secrets
确切步数修改 随机步数修改
Name Value Name Value
USER_PHONE 18899996666 USER_PHONE 18899996666
USER_PWD abc123 USER_PWD abc123
STEP 10000 STEP_MIN 10000
------ STEP_MAX 12000

USER_PHONE是注册Zepp Life app的手机号,USER_PWD是账号密码,STEP_MIN必须小于STEP_MAX,最后修改的步数为二者之间随机数)

  1. 然后到changebushu_Action.py里选择到底需要确切还是随机,以下两种二选一,前者步数修改随机,后者步数修改确切。记得把另一句注释掉:
   step = str(randint(int(os.environ['STEP_MIN']), int(os.environ['STEP_MAX'])))
   step = os.environ['STEP']

确认一切无误就可以去ActionsRun workflow

如果不想设置 secrets 或者看了上面内容依然设置不好,请先看声明第四条,然后自己决定要不要使用以下方法:直接修改这个yml文件,把${{ secrets.USER_PHONE }}${{ secrets.USER_PWD }}${{ secrets.STEP }}等相关参数设置好,然后直接去 Actions 里 Run workflow 。但是要注意因为直接 fork 的仓库默认是公开public状态,所以你的个人隐私信息可能暴露!开发者不对此负任何责任。其实从这个方面来说还是设置secrets更香:stuck_out_tongue_closed_eyes:

回到顶部

GitHubAction设置每日定时执行

直接修改这个yml文件,把以下两句解除注释:

schedule:
    - cron: '0 9,12 * * *'

即可每日在北京时间17:00、20:00运行。但 Action 的 schedule 经常出现不准时运行的情况,比如定了20:00却拖到20:50(甚至更晚)。而且第一天修改很可能当天不会执行

修改里面的时间可以自己确定运行时间,要注意的是里面的数字指的是 UTC 时间,换算成北京时间要加8h。

关于 GitHub Action 定时执行,请看与此相关的 GitHub 官方文档

回到顶部

通过阿里云

  1. 下载changebushu.py
  2. 登录阿里云并进入到CPU或者GPU环境,在里面上传changebushu.py
  3. 修改用户登录手机号user和密码password,一定要是注册Zepp Life app
  4. 修改步数,以下两种二选一,前者步数修改确切,后者步数修改随机。记得把另一句注释掉:
step = ''
step = str(randint(10121, 12302))
//确保前面的数字小于后面的数字

保存修改后的.py文件 6. 新建一个terminal

python3 changebushu.py

回到顶部

通过GoogleColab

阿里云要到期了:laughing:不想继续掏钱所以找到了Google Colab🤪

  1. 在GoogleColab新建一个.ipynb文件,点击+Code增加一个代码块(一个就够了!)
  2. changebushu.py里面的代码全部复制进这一个代码块里
  3. 修改用户登录手机号user和密码password,一定要是注册Zepp Life app
  4. 修改步数,以下两种二选一,前者步数修改确切,后者步数修改随机。记得把另一句注释掉:
step = ''
step = str(randint(10121, 12302))
//确保前面的数字小于后面的数字
  1. 直接运行这个代码块即可

回到顶部

注意事项

  • 不保证一定成功,出问题概不负责嗷:innocent:
  • Github Action 要用changebushu_Action.py,阿里云和 Google Colab 要用changebushu.py,别弄混了。(不光是环境变量配置的问题,changebushu_Action.py里删除了很多调试参数输出,以确保不会在workflow里输出隐私信息)
  • Github Action 设置secrets时注意要按照上文的步骤弄,不要先设置Environments然后在里面加变量
  • 实在设置不好可以看上文中不想设置secrets如何解决,但是请先看声明第四条

回到顶部

更新日志

删除了很多 commits 记录,都快被我删没了:rofl:所以在这稍微记录一下

  • v0.1 2022.5.11:第一次上传,添加阿里云的使用方法
  • 2022.7.16:添加 Google Colab 的使用方法;部分代码修改
  • v0.2 2022.7.17:添加 Github Action 的使用方法;重写README.md;部分代码修改
  • v0.3 2022.7.21:增加随机步数选择
  • 2022.7.22:增加GitHub Action每日自动执行

回到顶部

声明

  • 本项目仅供编程学习/测试使用
  • 请在国家法律法规和校方/公司相关原则下使用
  • 开发者不对任何下载者和使用者的任何行为负责
  • 程序使用的所有信息均利用 Github 的 Encrypted secrets 加密,如果下载者和使用者通过上文中描述的“直接修改这个yml文件”的方法导致任何个人信息泄露,开发者不对此负责。开发者已经提供使用 Github 的 Encrypted secrets 加密的方法。

回到顶部

changewechatsport's People

Contributors

caryio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

changewechatsport's Issues

Running github actions failed

It's unnormal after date 2022-09-26. I have tried for call login api, and it return 400. Maybe the API is updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.