Save coupons automatically!
Tired of receipts longer than the toilet paper you just bought?
If you want more coupons and want to save the environment at the same time, I highly suggest signing up to digital receipts or registering an account!
By doing so, the coupons that typically print on your receipt will instead be sent to your email; from there you'll be able to send these coupons directly to your card. Once they're on your card, they'll be applied automatically when you check out—no need to remember to bring them to the store and apply them yourself anymore!
This script has a few dependencies that must be installed before use.
The easiest way to install this is with Homebrew. In a command line window, run brew cask install chromedriver
and it will be automatically installed.
If you do not have Homebrew installed, follow the instructions on its website.
To install the splinter library to Python, use pip by running pip install splinter
.
I am temporarily also using six
for compatibility across different versions of Python. Please install with pip install six
. I intend to remove this dependency in the future and deprecate Python 2.
- In a Terminal window, navigate to the folder in which the Python file is located (using
cd
). - Then, run the bash script with
./save_money.sh
. This script will automatically update your local repo with the latest code and start the Python script. - Follow the prompts.
- Save money at the store!
If the bash script does not work, it may have failed on some intermediate step, or it might not have permissions to run.
If the issue is permissions:
- Run
chmod u+x save_money.sh
- Try to run it again with the steps in Running the Script above.
If the script fails on an intermediate step, run the steps manually to diagnose the issue:
- Update the local repo with
git pull
. - Run the Python script with
python coupons.py
.