This script will loop through all the Amazon giveaways and try to submit entries for them.
I wanted a reason to experiment with Puppeteer, so here goes.
Note: does not support entries that require following someone.
You can install giveaway-grabber using npm:
$ npm install -g giveaway-grabber
Or, you can clone this repo and run via npm start
.
As CLI:
$ gg [email protected] --password=123456
If cloned:
Copy .env.example to .env, adding your own Amazon username and password.
$ npm start
Note that the script will crash if the Chrome window is minimized! Check the console to monitor feedback.
If it does happen to die, re-start it on any page like:
$ gg [email protected] --password=123456 --page=34
OR:
$ npm start -- --page=34
If you have two factor authentication enabled, add --2FA
flag:
$ gg [email protected] --password=123456 --2FA
OR:
$ npm start -- --2FA
The script will wait for you to enter your code.
Every so often Amazon will present a CAPTCHA. The script will pause at this
point and wait for you to enter it. The console will warn you with an ENTER CAPTCHA!
message,
and you should get a system notification (only tested it on Windows 10).
If there are types of giveaways you always want to skip, you can add a comma separated list of keywords to a blacklist.
$ gg [email protected] --password=123456 --blacklist="perfume,kindle edition,floss"
or if cloned, add them to your .env
file like BLACKLIST="perfume,kindle edition,floss"
.
Keywords are case insensitive.
The console will let you know when it skips giveaways that you marked as blacklisted like giveaway 5 is blacklisted [kindle edition].
If you are lucky enough to win, you should get a system notification and the url to
the page will be logged like Winning Entry URL: https://amazon.com/ga/p/335..
.
If you want to also receive an email notification, sign up for a free sendgrid account and
add the API key to the .env file like SENDGRID_API_KEY="YOUR_API_KEY_HERE"
or cli command:
$ gg [email protected] --password=123456 --SENDGRID_API_KEY="YOUR_KEY_HERE"
If you have any questions, just open an issue.
This project is not associated with Amazon in any way. I just created it for my own experimentation, so use at your own risk.