Skip to main content

Bought

A bot which can purchase items online, rendering them bought.

In principle, this bot is intended to combat scalping practices. Most bots are closed source and cost money; however, if everyone has access to a free bot, the playing field can be leveled. Additionally, bought is written to purchase at most one item -- the first product it sees available -- and never more.

Installation

Installing this bot is a multi-step process involving a Command Line Interface (CLI) such as Windows PowerShell, Bash, or Zsh:

  1. Download Python
  2. Installing Bought
  3. Download browser drivers

1. Downloading Python

Open up your respective CLI and type:

python --version

This will display the python version on your system. Ensure you are running Python 3.7, or higher. If you are running an earlier version of Python, please update your Python. If a Python version isn't installed on your computer and you received an error running this command, download Python from Python.org, or a Python distribution like Anaconda.

2. Installing Bought

Python comes with its own package manager called pip which can install packages/libraries. Upgrade the pip package using pip:

python -m pip install --upgrade pip

Now run the following to download this project package to your system's Python:

pip install bought

If you need to update bought in the future, run:

pip install --upgrade bought

3. Install Webdriver

Vist the selenium documentation page and download the driver for your preferred browser: Firefox | Chrome

This driver will need to be added to your PATH environment variable. You can do this on your specific OS as follows:

Windows Path

Press the Windows key, and type "environment": Edit the system environment variables - Control Panel

Select the above item in the Control Panel, under the advanced tab, find Environment Variables... in the bottom right corner.

System Properties - Advanced - Environment Variables...

Under User variables, select Path, Edit..., New, and provide the path to the FOLDER that contains the driver you downloaded.

Environment variables

Linux/MacOS

In Linux and MacOS, your corresponding CLI will have its own configuration file (typically in your home folder). For bash and zsh, this is ~/.bashrc and ~/.zshrc, respectively.

Open the file to configure your CLI and add the following line to the bottom:

export PATH=/path/to/driver:$PATH

Save and exit. You can restart your CLI, or execute the source command for your corresponding configuration file:

source ~/.bashrc
source ~/.zshrc

Usage

Bought uses Python's console scripts entry point. This allows you to use the bought command from your CLI:

bought --help

This will display a list of subcommands and flags that can be used to configure bought and run it from the command line; however, it is highly recommended to use Bought with a config file. A template configuration file file is provided in this repository. Download this file and modify the parameters.

You can then run bought as follows:

Windows

bought -c DriveLetter:\path\to\config.ini

For example, substituting DriveLetter:\ (e.g. C:\) and path\to\ (e.g. Users\MyUsername\Downloads\):

bought -c C:\Users\MyUsername\Documents\config.ini

Linux/OSX

bought -c /path/to/config.ini For example, substituting DriveLetter:\ (e.g. C:\) and path\to\ (e.g. Users\MyUsername\Downloads\):

bought -c /home/MyUsername/Documents/config.ini

If your CLI's current working directory is in the same location, you can use a relative path to your configuration file (i.e. bought -c config.ini).

The config.ini file can be specified in any directory. A sample one is provided in this repository with descriptive comments about their usage.

Contributing

First and foremost, create an issue on the github repository. This is where issues can be made known publicly -- be sure to check for duplicates prior to submitting an issue.

If you want to address an issue yourself, fork this repository, develop your changes in a branch seperate from main, and submit a pull request.

This project uses poetry which allows for build isolation in a virtual environment. After downloading the repository, run poetry shell and poetry install from the root of the repository to install the project. You may need to uninstall the PyPI version of bought with pip uninstall bought to use your own version of bought.

Release files for bought 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bought 0.1.5
File Size Uploaded
bought-0.1.5.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bought 0.1.5
File Interpreter ABI Platform
bought-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 50.2 kB

Release files / bought-0.1.5.tar.gz

Download URL bought-0.1.5.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8689cd811fcdc4f7704aecc2ceaf85a334950a4c0e6057b80f66172d5946f935
BLAKE2b-256 checksum
How to use checksums
290c8ae714982cf69d0e34f778078b48f9ae6bf0b230e364d42e7469ddf8c373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure

Release files / bought-0.1.5-py3-none-any.whl

Download URL bought-0.1.5-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd32a6ef305dfb0500d0d8978bed995b5da7154c00f97f76146acb5041e6a753
BLAKE2b-256 checksum
How to use checksums
c47ff452f17dae7c835e256221c19cebc4bd1e30560cb9b99641d601af921254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page