justinjohnso / giftcards_galore

Python script to automate buying Amazon giftcards
31 stars 6 forks source link

Giftcards Galore!

Python script to auto-buy Amazon giftcards

Based off of:
https://github.com/ageoldpun/amazon_gifts
http://pastebin.com/UW6eC3rn


Dependencies:


Installation/Setup:

Install Selenium using pip install selenium
Download the Chrome Webdriver and ensure it can be found on your system PATH
Install python-dotenv using pip install python-dotenv

Variables:

These are environment variables:

You can define using whatever method works best for you (export in .bash_profile, define in Python console, or just define in the script), or you can create a .env file in the following format:

# .env file
AMAZON_USERNAME=user@domain.com
AMAZON_PASSWORD=password
CC0=1234567890123456
CC1=7890123456789012
GIFT_CARD_AMOUNT=1.00

You need your card numbers because Amazon will ask to confirm each one for the first iteration of a given card.

These are arrays that correspond with the (0-indexed) list of cards on your Amazon Wallet page:


Usage:

In terminal, run python giftcards_galore.py. Selenium will open a new Chrome window and start the script.

For testing purposes, I recommend starting with one iteration per card.