Bot for monitoring GPU stock availability at Best Buy and purchasing once stock has returned. Can also be used for other Best Buy products with a desired product URL.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
Developed during the Great GPU Shortage of 2021. Bot uses Selenium to control a Chrome web driver with a custom user agent and various other strategies to mask bot presence. Utilizes some shortcuts to speed up purchasing process. Status updates pushed to configurable Discord channel via Discord webhook so current status can be monitored remotely.
Before beginning setup, it is recommended to [https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments](create and activate a Python virtual environment).
- Clone the repo
git clone https://github.com/ben-m-90/bestbuystockbot.git
- Navigate your terminal to the local storage location created in Step 1.
- Install packages from requirements.txt
pip install -r requirements.txt
- Rename 'sample.env' to '.env'
- Edit '.env' in a text editor.
- DISCORD_TOKEN, DISCORD_GUILD, MENTION_ID, and WEBHOOK_URL will be set by Discord. See [https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks](Discord documentation on creating webhooks).
- LOGIN_EMAIL, LOGIN_PASSWORD, and CVV are your login information for BestBuy.com. Default payment methods and shipping addresses must be setup through BestBuy.com. CVV will be your credit card CVV used for finalizing a purchase. The bot will use your default payment method associated with your BestBuy.com account. No payment information is passed through or stored by this bot, only CVV.
- Add URLs for products to be monitor, separated by commas and on new lines.
DISCORD_TOKEN = "" DISCORD_GUILD = "" MENTION_ID = "" WEBHOOK_URL = "" LOGIN_EMAIL = "" LOGIN_PASSWORD = "" CVV = "" URL_LIST = " https://www.bestbuy.com/site/nvidia-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card-titanium-and-black/6429440.p?skuId=6429440, https://www.bestbuy.com/site/evga-geforce-rtx-3080-xc3-ultra-gaming-10gb-gddr6-pci-express-4-0-graphics-card/6432400.p?skuId=6432400, https://www.bestbuy.com/site/asus-rog-strix-g15-advantage-edition-15-6-fhd-gaming-laptop-amd-ryzen-9-5900hx-16gb-memory-radeonrx-6800m-512gb-ssd/6466550.p?skuId=6466550"
- Additional settings are available in stock_bot.py
- Set 'PRINT_TO_DISCORD' to True to enable printing status updates to the Discord webhook configured in Step 4.
- Run bot in your Python Virtual Environment. Note that the shortcut py may not work on all systems and is dependent on how your local Python installation is configured.
py stock_bot.py
After properly configuring, the bot will cycle through list of provided URLs and check if stock is available. It will continue to do this until it detects a product has return to stock. Once a product has been detected as in stock the bot will execute a purchase process where the product will be purchased. Default payment methods and shipping locations must be setup through BestBuy.com for this to work.
- Extend functionality to work with other websites outside of BestBuy (e.g. Amazon, Newegg)
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/ben-m-90/bestbuystockbot