{"id":14978007,"url":"https://github.com/ericjmarti/inventory-hunter","last_synced_at":"2025-05-16T03:05:56.790Z","repository":{"id":46646588,"uuid":"313440632","full_name":"EricJMarti/inventory-hunter","owner":"EricJMarti","description":"⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock","archived":false,"fork":false,"pushed_at":"2023-01-13T17:51:32.000Z","size":1130,"stargazers_count":1123,"open_issues_count":94,"forks_count":258,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-05-16T03:05:50.044Z","etag":null,"topics":["amd","bot","discord","docker","intel","nvidia","ps5","python","raspberrypi","rtx3070","rtx3080","rtx3090","ryzen","slack","telegram","xbox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EricJMarti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-16T22:15:42.000Z","updated_at":"2025-05-15T21:34:15.000Z","dependencies_parsed_at":"2023-02-09T16:30:25.159Z","dependency_job_id":null,"html_url":"https://github.com/EricJMarti/inventory-hunter","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricJMarti%2Finventory-hunter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricJMarti%2Finventory-hunter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricJMarti%2Finventory-hunter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricJMarti%2Finventory-hunter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricJMarti","download_url":"https://codeload.github.com/EricJMarti/inventory-hunter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd","bot","discord","docker","intel","nvidia","ps5","python","raspberrypi","rtx3070","rtx3080","rtx3090","ryzen","slack","telegram","xbox"],"created_at":"2024-09-24T13:56:41.374Z","updated_at":"2025-05-16T03:05:51.780Z","avatar_url":"https://github.com/EricJMarti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inventory Hunter\n\n![Build](https://github.com/EricJMarti/inventory-hunter/workflows/Build/badge.svg) ![Docker Pulls](https://img.shields.io/docker/pulls/ericjmarti/inventory-hunter) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/ericjmarti/inventory-hunter/latest)\n\nThis bot helped me snag an RTX 3070... hopefully it will help you get your hands on your next CPU, GPU, or game console.\n\n## Requirements\n\n- Raspberry Pi 2 or newer (alternatively, you can use an always-on PC or Mac)\n- [Docker](https://www.docker.com/) ([tutorial](https://phoenixnap.com/kb/docker-on-raspberry-pi))\n\nYou will also need one of the following:\n- [Discord Webhook URL](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)\n- [Slack Webhook URL](https://api.slack.com/messaging/webhooks)\n- [Telegram Webhook URL and Chat ID](https://core.telegram.org/bots/api)\n- [SMTP relay to send automated emails](https://medium.com/swlh/setting-up-gmail-and-other-email-on-a-raspberry-pi-6f7e3ad3d0e)\n\n## Quick Start\n\nFor instructions specific to Windows, please see this guide instead: [Instructions for Windows](https://github.com/EricJMarti/inventory-hunter/wiki/Instructions-for-Windows)\n\nThese steps *should* work on any supported Docker platform, but they have been specifically tested on Raspberry Pi OS with Docker already installed.\n\n1. Clone this repository and pull the latest image from [Docker Hub](https://hub.docker.com/r/ericjmarti/inventory-hunter):\n    ```\n    pi@raspberrypi:~\n    $ git clone https://github.com/EricJMarti/inventory-hunter\n\n    pi@raspberrypi:~\n    $ cd inventory-hunter\n\n    pi@raspberrypi:~/inventory-hunter\n    $ docker pull ericjmarti/inventory-hunter:latest\n    ```\n\n2. Create your own configuration file based on one of the provided examples:\n\n    - [Amazon RTX 3080 config](config/amazon_rtx_3080.yaml)\n    - [Best Buy RTX 3060 Ti config](config/bestbuy_rtx_3060_ti.yaml)\n    - [B\u0026H Photo Video RTX 3070 config](config/bhphoto_rtx_3070.yaml)\n    - [Micro Center RTX 3070 config](config/microcenter_rtx_3070.yaml)\n    - [Newegg RTX 3070 config](config/newegg_rtx_3070.yaml)\n\n3. Start the Docker container using the provided `docker_run.bash` script, specifying the required arguments.\n\n    If using Discord or Slack, the format of your command will look like this:\n\n    ```\n    $ ./docker_run.bash -c \u003cconfig_file\u003e -a \u003cdiscord_or_slack\u003e -w \u003cwebhook_url\u003e\n\n    # Discord example:\n    pi@raspberrypi:~/inventory-hunter\n    $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -a discord -w https://discord.com/api/webhooks/...\n    ```\n\n    If using an SMTP relay, the format of your command will look like this:\n\n    ```\n    $ ./docker_run.bash -c \u003cconfig_file\u003e -e \u003cemail_address\u003e -r \u003crelay_ip_address\u003e\n\n    # SMTP example:\n    pi@raspberrypi:~/inventory-hunter\n    $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -e myemail@email.com -r 127.0.0.1\n    ```\n\n## Getting New Code\n\n1. First identify any running container names related to inventory-hunter\n    ```\n    $ docker ps\n    ```\n2. Stop and remove all containers related to inventory-hunter\n    ```\n    $ docker stop CONTAINER_NAME\n    $ docker rm CONTAINER_NAME\n    ```\n3. Pull repo updates\n    ```\n    $ git pull\n    ```\n4. Rerun the docker_run.bash command to start containers back up with updates.\n    ```\n    $ ./docker_run.bash -c \u003cconfig_file\u003e -a \u003cdiscord_or_slack\u003e -w \u003cwebhook_url\u003e\n    ```\n\n## Configuring Alerters\n\nIf 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.\n\n1. Create a file called alerters.yaml in the config directory.\n\n2. Configure the alerters you would like to use based on this example:\n\n    ```\n    ---\n    alerters:\n      discord:\n        webhook_url: https://discord.com/api/webhooks/XXXXXXXXXXXX...\n        mentions:\n          - XXXXXXXXXXXXXXX\n          - XXXXXXXXXXXXXXX\n      telegram:\n        webhook_url: https://api.telegram.org/botXXXXXXXXXXXXXXXXXXXX/sendMessage\n        chat_id: XXXXXXXX\n      email:\n        sender: myemail@email.com\n        recipients:\n          - myemail@email.com\n          - myfriendsemail@email.com\n        relay: 127.0.0.1\n        password: XXXXXXXXXX   # optional\n      slack:\n        webhook_url: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\n        mentions:\n          - XXXXXXXXXXXXXXX\n          - XXXXXXXXXXXXXXX\n    ...\n    ```\n\n3. Add this config file to your run command:\n\n    ```\n    pi@raspberrypi:~/inventory-hunter\n    $ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -q ./config/alerters.yaml\n    ```\n\n## How it works\n\nThe 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.\n\n## FAQ\n\n### How is this different from existing online inventory trackers?\n\nBefore 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:\n\n- it runs on your own hardware, so no processing time is spent servicing other users\n- you get to choose which products you want to track\n- you are in control of the refresh frequency\n\n### What if inventory-hunter gets used by scalpers?\n\nI 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.\n\n### Do I really need Docker?\n\nNo, 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericjmarti%2Finventory-hunter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericjmarti%2Finventory-hunter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericjmarti%2Finventory-hunter/lists"}