Package: bought
BoughtA bot which can purchase items online, rendering thembought.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,boughtis written to
purchase at most one item -- the first product it sees available -- and never
more.InstallationInstalling this bot is a multi-step process involving a Command Line
Interface (CLI) such as Windows PowerShell, Bash, or Zsh:Download PythonInstalling BoughtDownload browser drivers1. Downloading PythonOpen up your respective CLI and type:python --versionThis 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 fromPython.org, or a Python distribution
likeAnaconda.2. Installing BoughtPython comes with its own package manager calledpipwhich can install
packages/libraries. Upgrade the pip package using pip:python -m pip install --upgrade pipNow run the following to download this project package to your system's
Python:pip install boughtIf you need to update bought in the future, run:pip install --upgrade bought3. Install WebdriverVist theselenium documentationpage and download the driver for your preferred browser:Firefox|ChromeThis driver will need to be added to your PATH environment variable. You can
do this on your specific OS as follows:Windows PathPress the Windows key, and type "environment":Select the above item in the Control Panel, under the advanced tab, findEnvironment Variables...in the bottom right corner.Under User variables, selectPath,Edit...,New, and provide the path
to the FOLDER that contains the driver you downloaded.Linux/MacOSIn Linux and MacOS, your corresponding CLI will have its own configuration
file (typically in your home folder). For bash and zsh, this is~/.bashrcand~/.zshrc, respectively.Open the file to configure your CLI and add the following line to the bottom:export PATH=/path/to/driver:$PATHSave and exit. You can restart your CLI, or execute the source command for
your corresponding configuration file:source ~/.bashrc
source ~/.zshrcUsageBought uses Python's console scripts entry point. This allows you to use theboughtcommand from your CLI:bought --helpThis 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. Atemplate configuration filefile is provided in this repository. Download this file and modify the parameters.You can then run bought as follows:Windowsbought -c DriveLetter:\path\to\config.iniFor example, substitutingDriveLetter:\(e.g.C:\) andpath\to\(e.g.Users\MyUsername\Downloads\):bought -c C:\Users\MyUsername\Documents\config.iniLinux/OSXbought -c /path/to/config.ini
For example, substitutingDriveLetter:\(e.g.C:\) andpath\to\(e.g.Users\MyUsername\Downloads\):bought -c /home/MyUsername/Documents/config.iniIf 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.ContributingFirst and foremost,create an
issueon 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 frommain, and submit a pull request.This project usespoetrywhich allows for build isolation in a virtual environment. After downloading
the repository, runpoetry shellandpoetry installfrom the root of the
repository to install the project. You may need to uninstall the PyPI version
ofboughtwithpip uninstall boughtto use your own version ofbought.