Best Buy Bullet Bot (3B Bot)

Overview

Best Buy Bullet Bot, abbreviated to 3B Bot, is a stock checking bot with auto-checkout created to instantly purchase out-of-stock items on Best Buy once restocked. It was designed for speed with ultra-fast auto-checkout, as well as the ability to utilize all cores of your CPU with multiprocessing for optimal performance.

  • Headless item stock tracking

  • Multiprocessing and multithreading for best possible performance

  • One-time login on startup

  • Ultra-fast auto-checkout

  • Encrypted local credentials storage

  • Super easy setup and usage

Bear in mind that 3B Bot is currently not equipped to handle a queue and/or email verification during the checkout process. If either of these is present, the bot will wait for you to take over and will take control again once you are back on the traditional checkout track.

Like fairgame, 3B Bot was created to help level the playing field by giving your average gamer a fighting chance against greedy scalpers. Getting started with 3B Bot was designed to be as easy as possible and shouldn’t take more than a couple of a minutes.

_images/demo.svg

Prerequisites

  1. A Best Buy account with your location and payment information already set in advance.

    The only information the bot will fill out during checkout is your login credentials (email and password) and the CVV of the card used when setting up your payment information on Best Buy (PayPal is currently not supported). All other information that may be required during checkout must be filled out beforehand.

  2. Python 3.6 or newer

    3B Bot is written in Python so if it is not already installed on your computer please install it from https://www.python.org/downloads/.

    Note

    On Windows make sure to tick the “Add Python to PATH” checkbox during the installation process. On MacOS this is done automatically.

    https://lh6.googleusercontent.com/Xirse0uDfZCQaHnIAa7UCd1IRr5_hnFgv8qDUEkT98ENyQ7E5I8R8nLbWmYMl3g1blhUCooAhJsZnKDmjQqeqfyUZnbVaHDOZY7qX7sW6Ui8ZdTjm0fzkwoZwV0xbfjaW3i9bVeg

    Feel free to install whichever version of Python you would like so long as it is 3.6 or greater. To check your version of the currently installed Python run the following in your shell.

    For MacOS:

    python3 --version
    

    For Windows:

    python --version
    

    If your version is less than 3.6 or you get the message python is not recognized as an internal or external command then install Python from the link above.

  3. A supported browser

    3B Bot currently only supports Chrome and Firefox. We recommend using the Firefox browser for it’s superior performance during tracking.

    Note

    Only the regular edition of each browser is supported, so if you have Firefox Developer Edition or Chrome Dev you would need to install the regular edition on top of your current installation.

    _images/firefox.png

Installation

Installing 3B Bot is as simple as running the following in your shell (Command Prompt for Windows and Terminal for MacOS)

For MacOS:

python3 -m pip install --upgrade 3b-bot

For Windows:

pip install --upgrade 3b-bot

This same command can be used for updating to the newest version once released.

If the installation fails please go back and make sure you have correctly completed the second step in the prerequisites. If the error persists please report the issue in the issue tracker.

Running the Bot

To start the bot just enter the following in your shell

3b-bot

Note

The bot can be stopped at any time regardless of OS with ctrl+c.

You will then be prompted to set some URLs to track. These URLs can be later modified with the commands 3b-bot add-url, 3b-bot add-url-group, 3b-bot remove-urls, and 3b-bot clear-urls.

Finally, you will be prompted to set a password for your encrypted keyring. The encrypted keyring is just the location that stores your Best Buy credentials (email, password, CVV). The keyring password is like a master password for all your credentials.

If you ever forget the password for your encrypted keyring, just clear your credentials with the following command and an opportunity will be granted to reset the password.

3b-bot clear-creds

To view the list of commands run

3b-bot --help

URLs

The following commands can be used to view and modify the added URLs.

  • view-urls View list of tracked URLs.

  • add-url Add URL to tracking list.

  • add-url-group Add multiple URLs and set a quantity for all of them as a whole instead of individually.

  • remove-url Remove a URL or URL group from the list of tracked URLs.

  • test-urls Tests all URLs to confirm that they are trackable. This is also run automatically on startup.

  • clear-urls Remove all tracked URLs.

Even with a quantity greater than 1, items will be purchased one at a time to prevent one person from buying up all the stock. For example, if you had a quantity of 2, when the item comes back in stock a single unit will be purchased, then if the item is still in stock, it will purchase the second item separately before exiting.

What is a URL group?

A URL group allows multiple URLs to connect to a single quantity. For example, if you wanted to get one RTX 3060 TI but didn’t care whether it was manufactured by ASUS or EVGA you could add the URL for each of the cards to a URL group and set a quantity of 1. The bot will purchase whichever one comes back in stock first, and once purchased will stop tracking both of them since you only wanted one graphics card.

Settings

Funds

Funds signifiy the maximum amount of money the bot is permitted to spend and can be set using the set-funds command. Make sure that your funds never exceed the amount of money on your card to prevent your card from getting declined during checkout. By default funds are set to $1,000.

Tax

Your state’s tax rate is used to predict the price of an item so that we don’t track items that exceed our funds. The tax rate can be set with the set-tax command.

Auto Checkout

If auto checkout is enabled the bot will attempt to automatically complete the checkout process for you as fast as possible. If it gets stuck during checkout it will wait for up to 20 minutes for you to take over. If you take over within that timeframe the bot will take back control once it sees something that it knows how to handle.

Bear in mind that disabling auto checkout comes with some benefits as well: faster startup, no personal data needs to be stored, and most importantly MUCH faster tracking. Without auto checkout we can make get requests instead of having to refresh the page constantly. This is orders of magnitude faster and if you intend to do the checkout process yourself it is the way to go.

Browser

Choose which browser to use for tracking and auto checkout. This only applies if auto chekcout is enabled. Auto checkout can be toggled with the toggle-auto-checkout command.

Sound Mode

When items come back in stock a sound will start playing to alert you of their availability. This parameter will specify whether you would like the sound to be completely disabled, to play once on restock, or play repeatedly until the item is no longer in stock.

Threads

Threads specify the number of trackers that should be started for each URL. Because it takes a while to get a response from Best Buy servers after making a get request multiple threads can be started so another thread can make a request while the other is waiting for a response.

Threads can be set with the set-threads command, but be cautious as to not set this value too high or you might overwhelm you CPU and actually hurt your performance.

1 Thread

3 Threads

https://files.realpython.com/media/IOBound.4810a888b457.png https://files.realpython.com/media/Threading.3eef48da829e.png

Image credit: https://realpython.com/python-concurrency/

Reference

A list of all commands and flags can be viewied in the shell with the following command.

3b-bot --help

Commands

start Start tracking the currently set URLs. This is the default command.

view-urls View list of tracked URLs.

add-url Add URL to tracking list.

add-url-group Add multiple URLs and set a quantity for all of them as a whole instead of individually.

remove-url Remove a URL from the list of tracked URLs.

test-urls Tests to make sure all URLs can be tracked. This is also run on startup.

clear-urls Remove all tracked URLs.

view-settings View current settings.

set-funds Set how much money the bot is allowed to spend. Defaults to $1000.

set-tax Set the sales tax rate for your state. Defaults to 9.5%.

toggle-auto-checkout Enable/disable auto checkout.

change-browser Pick the browser to be used during tracking and auto-checkout (only applies if auto-checkout is enabled). Firefox is the default and recommended browser.

test-sound Play sound sample.

set-sound-mode Choose whether you want sound to be completely disabled, play once on item restock, or play repeatedly on item restock.

set-threads Select the number of threads to allocate to tracking each URL.

count-cores Print how many CPU cores you have and how many threads each core has.

reset-settings Reset setting to the defaults.

view-creds View your Best Buy login credentials (email, password, cvv).

set-creds Set your Best Buy login credentials (email, password, cvv).

clear-creds Reset your Best Buy login credentials (email, password, cvv). Also offers the option to reset your access password.

Flags

Flags are options that can be passed alongside a command,with the exception of --help and --version which shouldn’t be passed with any commands.

--version Show 3B Bot version number.

--suppress-warnings Suppress warnings.

--headless Hide the browser during auto checkout.

--verify-account Confirm that the account is setup properly (automatically performed on first run).

--skip-verification Skip checks on first run that make sure account is setup properly.

--force-login Force browser to go through traditional login process as opposed to using cookies to skip steps.

Best Buy Bullet Bot, abbreviated to 3B Bot, is a stock checking bot with auto-checkout created to instantly purchase out-of-stock items on Best Buy once restocked. It was designed for speed with ultra-fast auto-checkout, as well as the ability to utilize all cores of your CPU with multiprocessing for optimal performance.

  • Headless item stock tracking

  • Multiprocessing and multithreading for best possible performance

  • One-time login on startup

  • Ultra-fast auto-checkout

  • Encrypted local credentials storage

  • Super easy setup and usage

Bear in mind that 3B Bot is currently not equipped to handle a queue and/or email verification during the checkout process. If either of these is present, the bot will wait for you to take over and will take control again once you are back on the traditional checkout track.

Like fairgame, 3B Bot was created to help level the playing field by giving your average gamer a fighting chance against greedy scalpers. Getting started with 3B Bot was designed to be as easy as possible and shouldn’t take more than a couple of a minutes.

_images/demo.svg