Use Zepp Life app ( formerly Xiaomi Sports app ) to modify the WeChat step count through Github Action/Alibaba Cloud/Google Colab. Github Action can set daily scheduled execution.
Successful personal test on 2022.8.18:ghost:
Using this warehouse requires Zepp Life app ( formerly Xiaomi Sports app ). Please be sure to register Zepp Life, set it up, and synchronize with WeChat/third-party access before reading below.
(back to top)
Settings - Actions - General - Allow all actions and reusable workflows
in your own Fork's warehouse, don't forget save
Settings - Secrets - Actions - New repository secret
, create several secrets
according to the following example:Exact number of steps modified | Random step number modification | ||
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
is the mobile phone number used to register Zepp Life app, USER_PWD
is the account password, STEP_MIN
must be less than STEP_MAX
, and the last modified number of steps is a random number between the two)
changebushu_Action.py
to choose whether it needs to be exact or random. Choose one of the following two options. The former changes the number of steps randomly, and the latter changes the number of steps exactly. Remember to comment out the other sentence: step = str ( randint ( int ( os . environ [ 'STEP_MIN' ]), int ( os . environ [ 'STEP_MAX' ])))
step = os . environ [ 'STEP' ]
After confirming that everything is correct, you can go to Run workflow
in Actions
If you don’t want to set secrets or you still can’t set them up well after reading the above content, please read the fourth statement first , and then decide whether to use the following method: modify the yml file directly and change ${{ secrets.USER_PHONE }}
, ${{ secrets.USER_PWD }}
Set relevant parameters such as ${{ secrets.USER_PWD }}
, ${{ secrets.STEP }}
, and then go directly to Run workflow in Actions. But be aware that because a directly forked repository is public
by default, your personal privacy information may be exposed! The developer takes no responsibility for this. In fact, from this aspect, it is better to set secrets: stuck_out_tongue_closed_eyes:
(back to top)
Directly modify this yml file and uncomment the following two sentences:
schedule:
- cron: '0 9,12 * * *'
It can run at 17:00 and 20:00 Beijing time every day. However, the Action schedule often does not run on time . For example, it is scheduled for 20:00 but delayed until 20:50 (or even later). And the modifications on the first day will most likely not be executed that day .
You can determine the running time by modifying the time inside. It should be noted that the number inside refers to UTC time, and 8 hours must be added to convert to Beijing time.
Regarding the scheduled execution of GitHub Action, please see the related GitHub official documentation.
(back to top)
changebushu.py
changebushu.py
thereuser
login mobile phone number and password
. It must be registered for Zepp Life app
step = ''
step = str ( randint ( 10121 , 12302 ))
//确保前面的数字小于后面的数字
Save the modified .py
file 6. Create a new terminal
python3 changebushu.py
(back to top)
Alibaba Cloud is about to expire:laughing: I didn’t want to continue spending money, so I found Google Colab ?
.ipynb
file in GoogleColab and click +Code
to add a code block (one is enough!)changebushu.py
into this code blockuser
login mobile phone number and password
. It must be registered for Zepp Life app
step = ''
step = str ( randint ( 10121 , 12302 ))
//确保前面的数字小于后面的数字
(back to top)
changebushu_Action.py
, Alibaba Cloud and Google Colab use changebushu.py
, don't get confused. (Not only is it an issue with environment variable configuration, a lot of debugging parameter output has been deleted in changebushu_Action.py
to ensure that private information will not be output in workflow
)secrets
in Github Action, be careful to follow the steps above. Do not set Environments
first and then add variables in them.secrets
above, but please read the fourth statement first.(back to top)
I deleted a lot of commits records, and I almost deleted them all: rofl: So I’ll record them here a little bit.
v0.1
2022.5.11: First upload, adding how to use Alibaba Cloudv0.2
2022.7.17: Add how to use Github Action; rewrite README.md
; modify some codev0.3
2022.7.21: Add random step selection(back to top)
(back to top)