This cdoe is used to answer the health survey automatically.
There are two ways to use it.
- Run locally
- Run on heroku using heroku scheduler
I recommend you to use the first one.
- Clone this repository.
- Set up chromedriver.(The configuration method differs depending on the OS.)
pip install -r requirements.txt
- Set the environment variables
- required
- export HEALTH_SERVEY_URL="https://..."
- export EMAIL="your email address"
- export PASSWORD="your password"
- optional
- export CHROME_DRIVER_PATH="path to chromedriver"
- export ACTIVITY_NAME="activity name"
- export IS_GET_EMAIL_RECEIPT="true or false"
- export IS_DETERMINATE_BY_BIZDAY="true or false"
- export IS_ATTEND_SCHOOL="true or false"
- required
python main.py
- (Set up to run periodically using the schedule function)
- Clone this repository.
- Set up git, heroku locally.
cd this repository
heroku create app-name
git remote add heroku your-heroku-app-url
git push heroku master
heroku addons:add scheduler:standard
(You may need to register your credit card.)- Set up heroku scheduler from the heroku scheduler page.
- Add buildpacks(after add buildpacks, you need to redeploy the app.)
- Set the environment variables
- required
- HEALTH_SERVEY_URL="https://..."
- EMAIL="your email address"
- PASSWORD="your password"
- CHROME_DRIVER_PATH="/app/.chromedriver/bin/chromedriver"
- optional
- ACTIVITY_NAME="activity name"
- IS_GET_EMAIL_RECEIPT="true or false"
- IS_DETERMINATE_BY_BIZDAY="true or false"
- IS_ATTEND_SCHOOL="true or false"
- LINE_NOTIFY_TOKEN="your line notify token"
- required