This script logs into your Amazon account and checks if items in your "Wish List" are available. If an item is found to be available the script will send an email with a link to the product.
Finding cleaning supplies is very difficult right now. I have my wish list loaded with various out-of-stock cleaning supplies and hopefully this will alert me as soon as something becomes available. I hope it will help you, too.
The script will frequently pause for a semi-random amount of time. This is to avoid script/bot detection by Amazon.
The script uses Gmail to send notifications.
-
Install dependencies (pip install -r requirements.txt)
-
Set up a burner Gmail account.
-
Turn Allow less secure apps to ON.
-
Save that burner address into the email-config.json file.
The first thing that the script will do is ask for the password to the burner Gmail account you set up. The password is not stored anywhere - just saved to a variable so the script can send an email when it finds an available item on your wish list.
Next, the script will open Amazon.com using it's own browser window. After a pause of somewhere between 3 and 15 seconds (random) the script will then bring the browser to the login page. From here you will manually log into your Amazon account from the browser.
The script is waiting for login to complete. After you have finished logging into your Amazon account please return to the script and press ENTER. This tells the script that you've finished and that it may now take over.
IMPORTANT: DO NOT USE THE BROWSER FOR OTHER PURPOSES. JUST LET IT RUN IN THE BACKGROUND.
The script will then loop through the following steps, with semi-random pauses between each step.
- Open the Wish List
- Scroll to the bottom (to make sure all items are loaded)
- Parse the items on the Wish List
- If an item on the Wish List has a price listed, visit the item's page to see if "Add to Cart" is an option.
- If an item appears to be available, send an email to the address listed in the email-config.json file.
- Save our current view of the Wish List to wish-list.json
- Save a list of items we've emailed to alerted.json
- Repeat.