Supply shortages are, unfortunately, a thing these days. Whether you're searching for a graphics card, gaming console, or that thing you've been wanting but never seems to be in stock, checking back manually enough times to beat the scalper bots is a hassle. Enter Huntsman - a python bot script capable of scanning a target website, checking if an item is in stock, and notifying you via email if the item is found. Powered by Selenium webdriver, Huntsman allows you to scan for an item without the potential of breaking a website's TOS or having to worry about bypassing a captcha.
To get started, clone this repo onto your local machine, and ensure you have the latest version of Python installed. Run pip install -r requirements.txt ; I'd advise using a virtual environment for this, to keep everything contained. Instructions on how to set up a virtual environment can be found here. You'll also need a local installation of chrome webdriver; you can find the correct download for your version of chrome here
Once you've got your dependencies installed, create a .env file, and create the variables EXE_PATH, LOGIN_EMAIL, LOGIN_PASS, and TARGET_EMAIL. EXE_PATH refers to the location of your local installation of chromedriver; LOGIN_EMAIL and LOGIN_PASS refer to the email you want to send messages from, and TARGET_EMAIL is the address you want notification messages sent to (this can be the same place you're sending messages from). Finally, change the destination variable to the URL of the item you want to scan. At the moment, this bot is configured to check pages on Newegg; to configure it for other sites, you'll need to modify the target variable with the ID of the element you want to scrape. Future updates will add compatibility for other sites.
Feel free to fork this repository and modify this script to your liking.
Questions about this project can be directed to:
- Github: /puentebravo
- Email:
N/A
Content in this project is governed under the MIT License.
To read the license in its entirety, click here: MIT
Copyright [2022] [Charlie Puente]