- Python3 (dev with 3.7.4)
- pip
Run pip install -r requirements.txt
to install required components.
- Copy
include/config.example.py
toinclude/config.py
. - Fill
TG_BOT_TOKEN
,TG_BOT_MASTER
ininclude/config.py
with your own bot token and administrator's telegram userid. - Run
python main.py --initdb
once to initialize SQLite database (my_app.db). - Run
python main.py
to start the bot.
By default, the bot will checkin all the normal accounts at 0:10 UTC+8, and retry the failed ones at 0:25.
You can change this behavior in include/config.py
.
Following step are proceed when checkin.
- Extracts
oldInfo
anddef
from web page. - Replace
id
,uid
,date
, andcreated
inoldInfo
by the ones indef
. - Sanitize these properties using default values:
ismoved
,jhfjrq
,jhfjjtgj
,jhfjhbcc
,sfxk
,xkqq
,sfsfbh
,ismoved
,xjzd
,bztcyy
. - Pick
address
,city
,province
,area
out fromgeo_api_info
if they are empty. - Post final data to saving API.
Pull requests and issues are always welcome.
Special thanks to ipid/bupt-ncov-report.