Just4Me
March 1, 2021 ยท View on GitHub
Just4Me is a website that allows you to run an automation of Von's and Albertson's Just4U Virtual Coupons.
Motivation
The motivation behind this project was to automate the virtual coupon clicking that Von's has for their Just4U program. One day when I was at my parents house my Mom was going through their website clicking each and every coupon on the site just in case she might buy one of the items later. I sat down and tried to do it a bit faster by hand, but it still felt like there would be a better way. After getting some exposure to Selenium I realised I could use it to automate the process.
Later I wanted to set up the automation to run on a cron job, so I wouldn't have to run the automation for my Mom and me. However, Windows 10 isn't as easy to set up crons as I'd like, so I made a website wrapper for the original code and hosted it on Heroku.
Support Me
Help me pay for Heroku Hobby tier dynos
Dependencies
Dependency Installation
pip3 install -r requirements.txt
Environment Variables
SECRET_KEY: A secret key for Flask
TOKEN: A secret token for access control to running the automation
CHROMEDRIVER_PATH: The path to the heroku chrome driver build pack executable
GOOGLE_CHROME_BIN: The path to the heroku chrome driver build pack binary
ENV: Prod/Dev for running locally without heroku buildpacks requirements
ENVis optional and will default to dev if left unfilledCHROMEDRIVER_PATHandGOOGLE_CHROME_BINare not required in a dev environment as they're not used for local run
How to Run
Pre-Requisites
- Install the Dependencies
- Set the Environment Variables
- Running via CLI
export SECRET_KEY=xxxxexport TOKEN=xxxx
- Running via
heroku local- Populate a
.envfile with the secrets-
SECRET_KEY=xxxx TOKEN=xxxx
-
- Populate a
- Running via CLI
Running
-
Via CLI
python app.py
-
Via
heroku local- Windows
heroku local -f Procfile.windows
- Not Windows
heroku local
- Windows
Example
The website is live at https://wfox-just4me.herokuapp.com/
Automation Example, this runs headless on Heroku

Deployment
The bot is currently deployed on Heroku.
The deployment is automated using the Deploy to Heroku Action from AkhileshNS.
Acknowledgements
-
- For getting me started on Heroku
-
Corey Schafer's Full-Featured Web App
- For getting me comfortable with a Flask website
Next Steps
- Notify User on Completion/Failed Login
