A Python based system to 1) attempt to purchase an item from a link; and 2) check the availability of a list of items. This project takes advantage of the systems provided through Selenium in order to interact with shop web pages. This (as of writing) does not integrate with any shop APIs.
WARNING: The use of this software can result in a Amazon restricting access to your account and make it difficultfor you to purchase products, with or without the bot. By using this software, you acknowledge these risks. These restrictions cannot and will not be resolved by the developer(s). If this is a major issue you should consider avoiding use of this software.
Account restrictions may be triggered by any of the following: 1) running multiple instances on one device, 2) running multiple instances on different devices, using the same account, regardless of their IP, proxy, or location, 3) configuring an instance to check stock too frequently/aggressively (default settings not guaranteed to be safe).
- Best Buy
- Amazon
- Newegg
- Python
- Selenium
pip install selenium
- Playsound
pip install playsound
- Google Chrome
- ChromeDriver
- Drop this in the same directory as
bot.py
andbot-availCheck.py
- Drop this in the same directory as
- A BestBuy account (create one) with a saved payment method (credit card)
- A valid Amazon account (presave your address and payment method!)
- Your OTP device on hand (manual login required)
- Make sure you have all the listed requirements above installed on your machine.
- Windows users can execute the supplied
installDependencies.ps1
script to walk through the requirements setup process
- Windows users can execute the supplied
- Customize
settings.json
to include all of your appropriate information. Use the tables below if you are unsure of what values you should use. - Run
bot.py
orbot-availCheck.py
through your favorite method- NOTE: It is recommended to run this through the command line to more easily observe any output that may come up
To make the population of links for the availability check easier to process, modify data.csv
such that each line is a pair of item name, link to BestBuy item
. Once you have all your new items accounted for, run processor.ps1
to generate new content in out.json
. Copy and paste the contents of the data
array inside of out.json
to the items
array in the available
settings.json
section.
Before putting the bot to work, you need to configure settings.json
so that the scripts will function correctly. Be sure not to commit or otherwise save your sensitive information in a public place (email, password, cvv, etc.). Non-GPU items from BestBuy should work but it is not guranteed.
OOtB the availability bot has a long list of RTX 30 series cards available on Best Buy; however, you will need to check the validity of this list to ensure your checks are up to date.
Key | Description | Default |
---|---|---|
loggingLevel | Set the level of logging in the bot script such that
|
3 |
testMode | Set to false to allow purchases to trigger, otherwise leave to true | true |
Key | Description | Default |
---|---|---|
timeout | The timeout used in the Selenium driver for actions | 10 |
alertType | The media type the alert file currently is (alert_buy ). Must be mp3 or wav |
wav |
amz_email* | your email for your Amazon account | N/A |
amz_pwd* | your password for your Amazon account | N/A |
bb_email* | your email for your Best Buy account | N/A |
bb_password* | your password for your Best Buy account | N/A |
bb_cvv* | your security code for your Best Buy saved payment method | N/A |
item | a link to the item of which you want to automate purchasing | N/A |
queueExists | represents whether the item being purchased is part of a queue system - queue system requires manual input for final checkout | true |
*If you update these in your settings, please do not commit it to your local repository! I do not take responsibility for any PII that may leak through your commits!
Key | Description | Default |
---|---|---|
timeout | The timeout used in the Selenium driver for actions | 10 |
alertType | The media type the alert file currently is (alert_available ). Must be mp3 or wav |
wav |
openNewBrowser | Wheter to open a new browser window when an available item is found (uses default browser) | false |
shortURL | Whether the link presented in the console for will be a TinyURL link or the full shop link | true |
items | A list of items to check for availability. Must be presented as {"name":"item name","link":"link to the item","type":"category of product"} |
N/A |
The included alert sound can be changed to any other .wav
file. Simply put the new .wav.
file in the sounds
folder and rename it to alert.wav
. The process is similar if you would like to use a .mp3
instead. Be sure to change the alertType value alertType
to either mp3
or wav
. No other types are supported at this time.
Join my Discord and join the Programmer's Parlor. #code-talk can be used to discuss this project, and code in general. Assistance may be provided on a case by case instance; however no offical or 24/7 support will be provided. Do not ping mods or admins for assitance for code.
wav Alert sound - NenandSimic