GithubHelp home page GithubHelp logo

phyltr / inventory-hunter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericjmarti/inventory-hunter

0.0 0.0 0.0 68 KB

⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock

License: MIT License

Python 92.48% Dockerfile 1.13% Shell 6.38%

inventory-hunter's Introduction

Inventory Hunter

This bot helped me snag an RTX 3070... hopefully it will help you get your hands on your next CPU, GPU, or game console.

Requirements

  • Raspberry Pi (alternatively, you can use an always-on PC)
  • Docker (tutorial)

You will also need one of the following:

Quick Start

These steps should work on any supported Docker platform, but they have been specifically tested on Raspberry Pi OS with Docker already installed.

  1. Clone this repository and build a Docker image using the provided Dockerfile:
pi@raspberrypi ~
$ git clone https://github.com/EricJMarti/inventory-hunter.

pi@raspberrypi ~
$ cd inventory-hunter

pi@raspberrypi ~/inventory-hunter
$ docker build -t inventory-hunter .

Note: The docker build command may take a while to complete. If you experience issues building your Docker image, please try again using this build command:

pi@raspberrypi ~/inventory-hunter
$ docker build --build-arg requirements=requirements_lite.txt -t inventory-hunter .
  1. Create your own configuration file based on one of the provided examples:
  1. 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:

pi@raspberrypi ~/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:

pi@raspberrypi ~/inventory-hunter
$ ./docker_run.bash -c ./config/newegg_rtx_3070.yaml -e [email protected] -r 127.0.0.1

How it works

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.

FAQ

How is this different from existing online inventory trackers?

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:

  • it runs on your own hardware, so no processing time is spent servicing other users
  • you get to choose which products you want to track
  • you are in control of the refresh frequency

What if inventory-hunter gets used by scalpers?

I sure hope this doesn't happen... 2020 is 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.

Do I really need Docker?

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.

inventory-hunter's People

Contributors

ericjmarti avatar gu1ll0me avatar ms7m avatar phyltr avatar rushyrush avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.