This bot helped me snag an RTX 3070... hopefully it will help you get your hands on your next CPU, GPU, or game console.
You will also need one of the following:
For instructions specific to Windows, please see this guide instead: Instructions for Windows
These steps should work on any supported Docker platform, but they have been specifically tested on Raspberry Pi OS with Docker already installed.
Clone this repository and pull the latest image from Docker Hub:
[email protected]:~ $ git clone https://github.com/EricJMarti/inventory-hunter [email protected]:~ $ cd inventory-hunter [email protected]:~/inventory-hunter $ docker pull ericjmarti/inventory-hunter:latest
Create your own configuration file based on one of the provided examples:
Start the Docker container using the provided
docker_run.bash script, specifying the required arguments.
If using Discord or Slack, the format of your command will look like this:
$ ./docker_run.bash -c <config_file> -a <discord_or_slack> -w <webhook_url> # Discord example: [email protected]:~/inventory-hunter $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -a discord -w https://discord.com/api/webhooks/...
If using an SMTP relay, the format of your command will look like this:
$ ./docker_run.bash -c <config_file> -e <email_address> -r <relay_ip_address> # SMTP example: [email protected]:~/inventory-hunter $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -e [email protected] -r 127.0.0.1
$ docker ps
$ docker stop CONTAINER_NAME $ docker rm CONTAINER_NAME
$ git pull
$ ./docker_run.bash -c <config_file> -a <discord_or_slack> -w <webhook_url>
If you are interested in configuring multiple alerters or would like to keep your alerter settings saved in a file, you can configure inventory-hunter's alerting mechanism using a config file similar to the existing scraper configs.
Create a file called alerters.yaml in the config directory.
Configure the alerters you would like to use based on this example:
--- alerters: discord: webhook_url: https://discord.com/api/webhooks/XXXXXXXXXXXX... mentions: - XXXXXXXXXXXXXXX - XXXXXXXXXXXXXXX telegram: webhook_url: https://api.telegram.org/botXXXXXXXXXXXXXXXXXXXX/sendMessage chat_id: XXXXXXXX email: sender: [email protected] recipients: - [email protected] - [email protected] relay: 127.0.0.1 password: XXXXXXXXXX # optional slack: webhook_url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX mentions: - XXXXXXXXXXXXXXX - XXXXXXXXXXXXXXX ...
Add this config file to your run command:
[email protected]:~/inventory-hunter $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -q ./config/alerters.yaml
The general idea is if you can get notified as soon as a product becomes in stock, you might have a chance to purchase it before scalpers clear out inventory. This script continually refreshes a set of URLs, looking for the "add to cart" phrase. Once detected, an automated alert is sent, giving you an opportunity to react.
Before developing inventory-hunter, I used several existing services without any luck. By the time I received an alert, the product had already been scalped. This bot alerts faster than existing trackers for several reasons:
I sure hope this doesn't happen... 2020 and 2021 are bad enough already. My hope is that inventory-hunter levels the playing field a bit by giving real customers a better opportunity than they had previously. Serious scalpers will continue using automated checkout bots, and it is up to online retailers to combat this malarkey.
No, but I highly recommend it. If you know your way around python and pip/conda, then you should be able to replicate the environment I created using Docker.