An automated Python script to get daily rewards from 1point3acres (一畝三分地), and deploy the application on Heroku.
- Fork to your github repository.
-
Create the Heroku free account.
-
Create new app on Heruko.
- Click
New
>Create New App
>Create your own app name
- Connect with your Github.
- Go to
Deploy
tab >Connect to Gtihub
>Search your github repository
- Set up login credential.
- Go to
Setting
tab > ClickReveal Config Vars
- Create 4 pair of Key : Values
- CHROMEDRIVER_PATH : /app/.chromedriver/bin/chromedriver
- GOOGLE_CHROME_BIN : /app/.apt/usr/bin/google_chrome
- USERNAME : {your own 1point3acres username}
- PASSWORD : {your own 1point3acres password}
- Set up Buildpacks for Webdriver and Google Chrome.
- Scroll down to
Buildpacks
> ClickAdd Buildpacks
- Type 3 urls
https://github.com/heroku/heroku-buildpack-google-chrome
https://github.com/heroku/heroku-buildpack-chromedriver
https://github.com/heroku/heroku-buildpack-python
- Scroll down to
- All Done!
- Click
Open App
to see the results!
- Click
Optional:
Set up Scheduler on Heroku:
- Click
Resources
>Heroku Scheduler
>Create Job
- Choose
Every day at ...
with anytime you like - Copy and paste
python main.py
in the command input below - Save job
I follow this idea and instruction, and deploy the application on the Heroku, which can schedule a daily job to make the automated script more convienient.