Automatic coupon clipper for Safeway's online "Safeway for U" coupons
Project description
Automatic Safeway coupon clipper
safeway-coupons is a script that will log in to an account on safeway.com, and attempt to select all of the "Safeway for U" electronic coupons on the site so they don't have to each be clicked manually.
For best results, run this program once a day or so with a cron daemon.
Prerequisites
- Poetry:
pip install poetry
- sendmail (optional)
Usage
Configuration
safeway-coupons can clip coupons for one or more Safeway accounts in a single run, depending on the configuration method used.
If a sender email address is configured, a summary email will be sent for each
Safeway account via sendmail
. The email recipient defaults to the Safeway
account email address, but can be overridden for each account.
Accounts are searched via the following methods in the listed order. Only one account configuration method may be used at a time.
With environment variables
A single Safeway account can be configured with environment variables:
SAFEWAY_ACCOUNT_USERNAME
: Account email address (required)SAFEWAY_ACCOUNT_PASSWORD
: Account password (required)SAFEWAY_ACCOUNT_MAIL_FROM
: Sender address for email summarySAFEWAY_ACCOUNT_MAIL_TO
: Recipient address for email summary
With config file
Multiple Safeway accounts can be provided in an ini-style config file, with a section for each account. For example:
email_sender = sender@example.com ; optional
[safeway.account@example.com] ; required
password = 12345 ; required
notify = your.email@example.com ; optional
Provide the path to your config file using the -c
or --accounts-config
option.
Invocation
First, install the project dependencies with Poetry:
poetry install
Execute safeway-coupons
with Poetry:
poetry run safeway-coupons
Development
- Setup:
poetry install
- Run all tests:
poetry run poe test
- Fix linting errors:
poetry run poe lint
Created from smkent/cookie-python using cookiecutter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for safeway_coupons-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 521325f579ec7699eb273fe1ae3ad8b309f41795d3036245a11d4c304151d135 |
|
MD5 | 0264623e6507243e00654fb19b0d949e |
|
BLAKE2b-256 | 8648960bbf9bd34cdb30446aadceba2493d4953c38f0e40e421673417aa29572 |