{"id":13586097,"url":"https://github.com/Hari-Nagarajan/fairgame","last_synced_at":"2025-04-07T14:33:31.981Z","repository":{"id":42047467,"uuid":"296720659","full_name":"Hari-Nagarajan/fairgame","owner":"Hari-Nagarajan","description":"Tool to help us buy hard to find items. ","archived":false,"fork":false,"pushed_at":"2022-12-19T01:16:13.000Z","size":2361,"stargazers_count":2439,"open_issues_count":109,"forks_count":804,"subscribers_count":75,"default_branch":"master","last_synced_at":"2024-12-02T06:51:45.407Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hari-Nagarajan.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-09-18T20:14:00.000Z","updated_at":"2024-11-26T06:22:11.000Z","dependencies_parsed_at":"2023-01-29T20:15:59.915Z","dependency_job_id":null,"html_url":"https://github.com/Hari-Nagarajan/fairgame","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hari-Nagarajan%2Ffairgame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hari-Nagarajan%2Ffairgame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hari-Nagarajan%2Ffairgame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hari-Nagarajan%2Ffairgame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hari-Nagarajan","download_url":"https://codeload.github.com/Hari-Nagarajan/fairgame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247670416,"owners_count":20976562,"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":[],"created_at":"2024-08-01T15:05:19.663Z","updated_at":"2025-04-07T14:33:31.672Z","avatar_url":"https://github.com/Hari-Nagarajan.png","language":"Python","funding_links":[],"categories":["Python","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# FairGame README\n\n**Note: Development is no longer active on this project. Pull requests submitted by the community will still be reviewed and approved, if valid and functional.**\n\n# Table of Contents:\n* [About FairGame](#About-FairGame)\n    * [Current Functionality](#Current-Functionality)\n    * [Disclaimer](#Disclaimer) \n* [Installation](#Installation)\n    * [Requirements](#Requirements)\n    * [Quick Start](#Quick-Start)\n    * [Detailed Directions](#Detailed-Directions)\n        * [Python](#Python)\n        * [Downloading FairGame](#Downloading-FairGame)\n        * [Installing Dependencies](#Installing-Dependencies)\n        * [Configuration](#Configuration)\n        * [Running the program](#Running-the-program)\n        * [Start Up](#Start-Up)\n    * [Other Installation Help](#Other-Installation-Help)\n        * [ASINs](#ASINs)\n        * [Platform Specific](#Platform-Specific)\n* [Advanced Configuration](#Advanced-Configuration) \n    * [Notifications](#Notifications)\n        * [Sounds](#Sounds)\n        * [Apprise](#Apprise)\n        * [Testing notifications](#Testing-notifications)\n    * [CLI Tools](#CLI-Tools)\n        * [CDN Endpoints](#CDN-Endpoints)\n        * [Routes](#Routes)\n* [Issues Running FairGame](#Issues-Running-FairGame)\n    * [Known Issues](#Known-Issues)\n    * [Troubleshooting](#Troubleshooting)\n    * [Frequently Asked Questions](#Frequently-Asked-Questions)\n    \n\n# Quick Links\n * [Discord](https://discord.gg/4rfbNKrmnC) **DO NOT ASK QUESTIONS IN DISCORD BEFORE READING THIS DOCUMENT**\n * [Python Download (3.8.9)](https://www.python.org/downloads/release/python-389/)\n\n# About FairGame\n\nWe built this in response to the severe tech scalping situation that's happening right now. Almost every tech product\nthat's coming out right now is being instantly bought out by scalping groups and then resold at at insane prices. $699\nGPUs are being listed for $1700 on eBay, and these scalpers are buying 40 cards while normal consumers can't get a\nsingle one. Preorders for the PS5 are being resold for nearly $1000. Our take on this is that if we release a bot that\nanyone can use, for free, then the number of items that scalpers can buy goes down and normal consumers can buy items\nfor MSRP.\n\n**If everyone is botting, then no one is botting.**\n\n## Current Functionality\n\nFairGame only works on Amazon and can automatically place an order.\n### Other Notes on Functionality\n* By default, FairGame will only purchase new items with free shipping. This can be changed with options on the command\n  line, see [Configuration](#Configuration).\n* FairGame is designed to check if each product is in stock sequentially, not concurrently (by choice). While \n  more than one instance of the program can be run concurrently, we do not encourage nor support this and will not \n  provide help in doing so.\n* There is no functionality to stop and confirm information with your bank during checkout (sorry EU). If someone from\n  EU wants to figure this out and submit a pull request, that would be great.\n* FairGame organizes the products being checked into lists, and each list is subject to a minimum and maximum \n  purchase price range. Once an item is purchased from a list, that list is removed, and it will no longer \n  purchase an item from that list.\n  * If you want to set purchase price ranges for several different products, but only want FairGame to purchase\n    one of any of the products you've included in the configuration file, use the `--single-shot` option, see\n    [Running the program](#Running-the-program)    \n\n### Disclaimer \n\nWARNING: The use of this software can result in a Amazon restricting access to your account and make it difficult \nfor you to purchase products, with or without the bot. By using this software, you acknowledge these risks. These restrictions\ncannot and will not be resolved by the developer(s), nor can they be detected/resolved by the standard Amazon Customer Support,\nas far as we are aware. If this happens, the only resolution is to stop all Amazon monitors (e.g., FairGame, Distill.io,\nor other bots, etc.), wait, and hope the limits are lifted within a few days. If this is a major issue you should\nconsider avoiding use of this software. \n\nAccount restrictions may be triggered by any of the following: 1) running multiple instances on one device, 2) running multiple instances on different devices, using the same account, regardless of their IP, proxy, or location, 3) configuring an instance to check stock too frequently/aggressively (default settings not guaranteed to be safe). \n\nSymptoms of account restrictions include: 1) Fly-out (offers) window is missing/completely blank, even if there are listings for the ASIN, 2) frequent CAPTCHA checks, 3) inability to access the My Account page, add items to your cart, or complete purchases; usually displayed as a 503 error (Amazon Dogs \u0026 “SORRY we couldn’t find that page” message). You’ll likely have to sit-out a few days of drops to resolve the throttle.\n\n# Installation\n\n## Requirements\n\n***!!! YOU WILL NEED TO USE THE 3.8 BRANCH OF PYTHON, ANY OTHER BRANCH/VERSION (Anaconda, 2.7, 3.9.x, 3.10, 4.0,\ntoaster, etc.) BREAKS DEPENDENCIES !!!***\n\nIt is best if you use the newest version of **3.8** (at this time, 3.8.9) but 3.8.5, 3.8.6, 3.8.7, and 3.8.8 should also work. \n\nIt also requires a working Chrome installation. \nRunning it on a potato (\u003c2GB of RAM) is not suggested. \n\n## Quick Start\n\nHere are the very simple steps for running the bot on Windows, however most of these instructions should be followed\nregardless of your OS (obviously you aren't running .bat files if you aren't on Windows, or using GitHub Desktop if not \navailable on your OS). See [Platform Specific](#Platform-Specific) instructions for help installing Python and\ndependencies in other operating systems:\n1. [Turn on your computer](https://www.google.com/search?q=how+do+I+turn+on+my+computer)\n2. [Install Python 3.8.9](https://www.python.org/downloads/release/python-389/). Install to some location that does not include spaces in the path \n   (we suggest C:\\Python38). Click the checkbox that says Add Python 3.8 to PATH (or something similar) \n   during the installation.\n   \n   ![Add Python 3.8 to PATH](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/PythonInstalltoPath.png)\n   \n3. Download GitHub Desktop and Open the FairGame Repository with GitHub Desktop (or download the zip file). \n   Again, make sure this installs to a location without spaces in the path, but it is *STRONGLY* suggested that you install\n   to the root of the drive (e.g., C:\\fairgame). If you need help with GitHub Desktop, look at the\n   [Wiki](https://github.com/Hari-Nagarajan/fairgame/wiki/How-to-use-GitHub-Desktop-App).\n4. Open the FairGame folder in File Explorer. Double click __INSTALL (RUN FIRST).bat ***DON'T USE ADMINISTRATIVE MODE***.\n   \n   ![Run Install RUN FIRST.bat](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/Step4.png)\n   \n5. After this finishes (it could take a few minutes or longer), open the `config` folder in the FairGame folder, make \n   a copy of the amazon_config.template_json file and rename it to amazon_config.json. If you don't know how to rename\n   file extensions, look it up on [Google](https://www.google.com/search?q=how+do+I+rename+file+extensions+in+Windows).\n   \n   ![Config Folder](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/step5a.png)\n   \n   **Ignore extra files in this folder. Screenshot is based on development files. Just follow instructions as written!**\n   ![Copy template](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/Step5b.png)\n   \n6. Edit the amazon_config.json, this assumes US using smile.amazon.com. Using Amazon Smile requires that you select\n   a charity. If you do not know how to do this, use \n   [Google](https://www.google.com/search?q=how+do+i+select+a+charity+on+amazon+smile). \n   Find a product, like a USB stick that is in stock, and put the \n   [ASIN](https://www.google.com/search?q=what+is+an+ASIN) for that product in place of the B07JH53M4T listed below \n   (or use that if it is in stock). Change the reserve_min_1 and reserve_max_1 to be below and above the price of the\n   item, respectively: \n```json\n{\n  \"asin_groups\": 1,\n  \"asin_list_1\": [\"B07JH53M4T\"],\n  \"reserve_min_1\": 5,\n  \"reserve_max_1\": 15,\n  \"amazon_website\": \"smile.amazon.com\"\n}\n```\n   \n   ![Edit config file](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/Step6.png)\n   \n7. In File Explorer, double click the `_Amazon.bat` file in the FairGame folder. ***DON'T USE ADMINISTRATIVE MODE***. \n   Type in your amazon email address when asked for your amazon login ID. Type in your amazon account password when \n   asked for your amazon password. Type in a password for your credentials (this can be whatever you want, it just \n   encrypts your account email/password file)\n   \n   ![Run Amazon.bat](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/Step7.png)\n   \n8. Verify that the bot successfully makes it to the place an order screen with the item you put in the config file.\n   If it does not, then:\n   * You messed something up above, and need to fix it; or,\n   * If it is asking you for your address and payment info, you need to do all of the following in a separate\n     tab within the bots browser:\n     * Make sure one-click purchasing is set up for your account, \n     * Verify there is a default payment method and default address associated with that payment method,\n     * And then make a purchase manually in that separate tab of the bot's browser and verify that it \n       correctly sets your defaults for the browser. \n     * See [#faq on our Discord](https://discord.gg/GEsarYKMAw) for additional information.\n     * ALSO see notes regarding EU and [current functionality](#Other-Notes-on-Functionality)\n9. Edit the `amazon_config.json` file with the item(s) you want to look for. See [Configuration](#Configuration) \n   and [Configuration Examples](#Configuration-Examples) for additional information\n10. Remove `--test` from `_Amazon.bat`. \n[How do I edit .bat files?](https://www.google.com/search?q=how+to+edit+bat+file+in+windows+10)\n   \n   ![Remove Test](https://github.com/Hari-Nagarajan/fairgame/blob/master/docs/images/Step10.png)\n   \n11. Run `_Amazon.bat` and wait\n\n**Note:** If the terminal indicates that it attempts to add to cart and proceed to checkout, but it can't find the\nbutton to proceed to checkout and there are no items in your cart, or it has reached its maximum add to cart attempts,\nthat means that it tried to add the product to cart, and it failed. This is exactly what happens if you were to try\nand and attempt to do this manually.\n\n![image](https://user-images.githubusercontent.com/74267670/115074770-2832d580-9ec8-11eb-8475-864d00e91d50.png)\n\n![image](https://user-images.githubusercontent.com/74267670/115074822-354fc480-9ec8-11eb-8cb6-075898ca20de.png)\n\nFurthermore, if the terminal indicates something about picking your address, and you did Step 8 above correctly (i.e.,\ntested the bot and it does not normally ask you for your address when checking out), then it is **VERY LIKELY** the product\nwas already out of stock and Amazon is sending you to a garbage page.\n\nAdditional information about running FairGame can be found in the rest of the documentation.\n\n## Detailed Directions\n### Python\nThis project uses Python 3.8.X and uses [Pipenv](https://pypi.org/project/pipenv/) to manage dependencies. \n\n### Downloading FairGame\nTo get started, there are two options:\n#### Releases\n\nTo get the latest release as a convenient package, download it directly from\nthe [Releases](https://github.com/Hari-Nagarajan/fairgame/releases)\npage on GitHub. The \"Source code\" zip or tar file are what you'll want. This can be downloaded and extracted into a\ndirectory of your choice, it is *STRONGLY* suggested that you install to the root of the drive (e.g., C:\\fairgame).\n\n#### Git\n\nIf you want to manage the code via Git, you'll first need to clone this repository. If you are unfamiliar with Git,\nfollow the [guide](https://github.com/Hari-Nagarajan/fairgame/wiki/How-to-use-GitHub-Desktop-App) on how to do that on\nour [Wiki](https://github.com/Hari-Nagarajan/fairgame/wiki/How-to-use-GitHub-Desktop-App). \nYou *can* use the \"Download Zip\" button on the GitHub repository's homepage but this makes receiving updates\nmore difficult. If you can get setup with the GitHub Desktop app, updating to the latest version of the bot takes 1\nclick. Regardless, it is *STRONGLY* suggested that you install to the root of the drive (e.g., C:\\fairgame)\n\n### Installing Dependencies\nIf you are on Windows, use `INSTALL (RUN FIRST).bat`. ***Do NOT use administrative mode***\n\nIf you are not on Windows, do the following:\n\n```shell\npip install pipenv\npipenv install\n```\n`pipenv install` must be run in the project's folder.\n\n**NOTE: YOU SHOULD RUN `pipenv install` ANY TIME YOU UPDATE, IN CASE THE DEPENDENCIES HAVE CHANGED!**\n\n### Configuration\n\nIn the `config` folder, make a copy of `amazon_config.template_json` and \n[rename](https://www.google.com/search?q=how+to+change+file+extensions+on+windows+10) it to `amazon_config.json`. Edit it \naccording to the \n[ASINs](https://www.datafeedwatch.com/blog/amazon-asin-number-what-is-it-and-how-do-you-get-it#how-to-find-asin) you are\ninterested in purchasing. You can find a list of ASINs for some common products people are looking for on our \nDiscord [#asins](https://discord.gg/DuVXAN5FnN). If it's not in there, you have to look it up yourself.\n\n* `asin_groups` indicates the number of ASIN groups (or lists) you want to use.\n* `asin_list_x` list of ASINs for products you want to purchase. You must locate these for the products you want, use \n  the links above to get started.\n    * The first time an item from list \"x\" is in stock and under its associated reserve, it will purchase it. FairGame \n      will continue to loop through the other lists until it purchases one item from each (unless the `--single-shot` \n      option is enabled, in which case it stops after the first purchase).\n    * If the purchase is successful, the bot will not buy anything else from list \"x\".\n    * Use sequential numbers for x, starting from 1. x can be any integer from 1 to 18,446,744,073,709,551,616\n* `reserve_min_x` set a minimum limit to consider for purchasing an item. If a seller has a listing for a 700 dollar\n  item a 1 dollar, it's likely fake.\n* `reserve_max_x` is the most amount you want to spend for a single item (i.e., ASIN) in `asin_list_x`. Does not include\n  tax. If `--checkshipping` flag is active, this includes shipping listed on offer page.\n* `amazon_website` amazon domain you want to use. smile subdomain appears to work better, if available in your\n  country. [*What is Smile?*](https://org.amazon.com/) Note that using Amazon Smile requires you to pick a charity.\n  If you do not do so, you will not be able to purchase anything, and you will likely have problems running FairGame.\n\n##### Configuration Examples\n\nOne unique product with one ASIN (e.g., Segway Ninebot S and GoKart Drift Kit Bundle) :\n\n```json\n{\n  \"asin_groups\": 1,\n  \"asin_list_1\": [\n    \"B07K7NLDGT\"\n  ],\n  \"reserve_min_1\": 450,\n  \"reserve_max_1\": 500,\n  \"amazon_website\": \"smile.amazon.com\"\n}\n```\n\nOne general product with multiple ASINS (e.g 16 GB USB drive 2 pack)\n\n```json\n{\n  \"asin_groups\": 1,\n  \"asin_list_1\": [\n    \"B07JH53M4T\",\n    \"B085M1SQ9S\",\n    \"B00E9W1ULS\"\n  ],\n  \"reserve_min_1\": 15,\n  \"reserve_max_1\": 20,\n  \"amazon_website\": \"smile.amazon.com\"\n}\n```\n\nTwo general products with multiple ASINS and different price points (e.g. 16 GB USB drive 2 pack and a statue of The\nThinker)\n\n```json\n{\n  \"asin_groups\": 2,\n  \"asin_list_1\": [\n    \"B07JH53M4T\",\n    \"B085M1SQ9S\",\n    \"B00E9W1ULS\"\n  ],\n  \"reserve_min_1\": 15,\n  \"reserve_max_1\": 20,\n  \"asin_list_2\": [\n    \"B006HPI2A2\",\n    \"B00N54S1WW\"\n  ],\n  \"reserve_min_2\": 50,\n  \"reserve_max_2\": 75,\n  \"amazon_website\": \"smile.amazon.com\"\n}\n```\nIf you wanted to watch another product, you'd add a third list (e.g. `asin_list_3`) and associated min/max pricing and\nincrease the `asin_groups` to 3. Add as many lists as are needed, keeping in mind that the main distinction between\nlists is the min/max price boundaries. Once any ASIN is purchased from an ASIN list, that list is remove from the hunt\nuntil FairGame is restarted.\n\nTo verify that your JSON is well formatted, paste and validate it at https://jsonlint.com/\n\n### Running the program\nIf you are on Windows, we suggest making a copy of `_Amazon.bat` and adding the options of your choice to the end of \nline (see Options below). Run the program by double clicking on the _Amazon.bat file (or whatever you renamed it to). \n***DO NOT RUN THE BATCH FILE WITH ADMINISTRATIVE MODE***\n\n**NOTE:** `--test` flag has been added to `_Amazon.bat` file by default. **This should be deleted after you've verified \nthat the bot works correctly for you.** If you don't want your `_Amazon.bat` to be deleted when you update, you should\ncopy it and rename it to something else as mentioned above.\n\nIf you are not on Windows, you can run the bot with the following command:\n\n```shell\npipenv run python app.py amazon [Options]\n\nOptions:\n  --headless          Runs Chrome in headless mode.\n  \n  --test              Run the checkout flow but do not actually purchase the item[s].  \n\n  --delay FLOAT       Time to wait between the end of one stock check and the beginning of the next stock check.\n  \n  --checkshipping     Also include items with a shipping price in the search.\n                      Shipping costs are factored into reserve price check calculation.\n\n  --detailed          Take more screenshots. !!!!!! This could cause you to\n                      miss checkouts !!!!!!\n\n  --used              Show used items in search listings.\n  \n  --single-shot       Quit after 1 successful purchase\n  \n  --no-screenshots    Take NO screenshots, do not bother asking for help if\n                      you use this... Screenshots are the best tool we have\n                      for troubleshooting\n\n  --disable-presence  Disable Discord Rich Presence functionallity\n  \n  --disable-sound     Disable local sounds.  Does not affect Apprise\n                      notification sounds.\n\n  --slow-mode         Uses normal page load strategy for selenium. Default is none\n\n  --p TEXT            Pass in encryption file password as argument\n  \n  --log-stock-check   Will log each stock check to terminal and log file\n  \n  --shipping-bypass   Bot will attempt to click \"Ship to this Address\" button,\n                      if it pops up during checkout. \n                      USE THIS OPTION AT YOUR OWN RISK!!!\n                      NOTE: There is no functionality to choose payment\n                      option, so bot may still fail during checkout\n                      \n  --help              Show this message and exit.\n\n```\n* [What is Headless](https://www.google.com/search?q=what+is+headless+chrome)\n* [What is Page Load Strategy?](https://www.google.com/search?q=what+is+page+load+strategy) \n\n\n#### Examples\n\nRunning FairGame with default functionality:\n```shell\npipenv run python app.py amazon\n```\n\nRunning FairGame to look for new and used items, and also include items that may have a shipping cost:\n```shell\npipenv run python app.py amazon --used --checkshipping\n```\n\nRunning Fairgame with delay of 4.5 seconds, and automatically putting in the credentials password of `abcd1234`\n```shell\npipenv run python app.py amazon --delay=4.5 --p=abcd1234\n```\n\n### Start Up\n\nWhen you first launch FairGame, it will prompt you for your amazon credentials.  You will then be asked for a password \nto encrypt them. Once done, your encrypted credentials will be stored in `amazon_credentials.json`. \nIf you ever forget your encryption password, just delete this file and the next launch of the bot will recreate it.\nAn example of this will look like the following:\n\n```shell\nINFO Initializing Apprise handler\nINFO Initializing other notification handlers\nINFO Enabled Handlers: ['Audio']\nINFO No credential file found, let's make one\nAmazon login ID: \u003cyour email address\u003e\nAmazon Password: \u003cyour amazon password\u003e\nINFO Create a password for the credential file\nCredential file password: \u003ca password used to encrypt your amazon credentials\u003e\nVerify credential file password: \u003cthe same password that was entered above\u003e\nINFO Credentials safely stored.\n```\n\nStarting the bot when you have created an encrypted file:\n\n```shell\nINFO Initializing Apprise handler\nINFO Initializing other notification handlers\nINFO Enabled Handlers: ['Audio']\nReading credentials from: amazon_credentials.json\nCredential file password: \u003center the previously created password\u003e\n```\n\n\n## Other Installation Help\n\n### ASINs\nSee [#asins](https://discord.gg/DuVXAN5FnN) channel on our Discord server, or look them up on Amazon.\n\n### Platform Specific\n\nThese instructions are supplied by community members and any adjustments, corrections, improvements or clarifications\nare welcome. These are typically created during installation in a single environment, so there may be caveats or changes\nnecessary for your environment. This isn't intended to be a definitive guide, but a starting point as validation that a\nplatform can/does work. Please report back any suggestions to our [Discord](https://discord.gg/wgCYBx9URn) feedback\nchannel.\n\n#### Installation MacOS \n\nUsage on Mojave (10.14) and above. Previous versions of macOS may not be compatible.\n\nEnsure you have Python 3.8.5+ (3.8.8 recommended) installed on your system. If not, you can download it from \nhttps://www.python.org/downloads/release/python-388/ in the Files section near the bottom of the page. Make sure \nto choose macOS 64-bit installer. Once downloaded, you can go through the installer's setup steps.\n\nDownload the ZIP of Fairgame from GitHub, or clone it with `git clone https://github.com/Hari-Nagarajan/fairgame`. \n\nOpen up the terminal on macOS (can be found in /Utilities in /Applications in Finder) and type `cd folderLocationHere/Fairgame`. \nIf you do not know where the folder is located, type `cd ` and then drag the Fairgame folder ontop of the terminal window \nand let go. It then should autofill the folder path.\n\nType `pip3 install pipenv` and hit enter.\n\nType `pipenv shell` and hit enter. \n\nType `pipenv install` and hit enter. \n\nType `pipenv run python app.py amazon` and go through setup. You will also need to set up the config file, seen below in the Configuration section\n\n#### Installation Ubuntu 20.10 (and probably other distros)\n\nBased off Ubuntu 20.10 with a fresh installation.\n\nOpen terminal. Either right click desktop and go to Open In Terminal, or search for Terminal under Show Applications\n\nInstall Google Chrome:\n`wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \u0026\u0026 sudo dpkg -i google-chrome-stable_current_amd64.deb`\n\nAdd Universe repo (this might be optional depending on your distro):\n`sudo add-apt-repository universe \u0026\u0026 sudo apt update`\n\nInstall Pip:\n`sudo apt install python3-pip`\n\nInstall pipenv:\n`pip3 install pipenv`\n\nAdd /home/$USER/.local/bin to PATH:\n`export PATH=\"/home/$USER/.local/bin:$PATH\"`\n\nInstall git:\n`sudo apt install git`\n\nClone git repository:\n`git clone https://github.com/Hari-Nagarajan/fairgame`\n\nChange into the fairgame folder:\n`cd ./fairgame/`\n\nPrepare your config files within ./config/\n\n```shell\ncp ./config/amazon_config.template_json ./config/amazon_config.json\ncp ./config/apprise.conf_template ./config/apprise.conf\n```\n\nMake a pipshell environment:\n`pipenv shell`\n\nInstall dependencies:\n`pipenv install`\n\nEdit the newly created files with your settings based on your [configuration](#configuration)\n\n#### Installation Raspberry Pi 4 (2 GB+)\n\nThis is an abridged version of the community created document by UnidentifiedWarlock and Judarius (link to this\ndocument can be found at end of this section, however you should **follow the README directions first!**). If the \nREADME steps don't work on your Pi 4, look at that document for additional options. This hasn't been tested\non a Pi 3, but given enough RAM to run Chrome, it may very well work. Let us know. \n\n```shell\nsudo apt update\nsudo apt upgrade\nsudo apt-get install -y build-essential tk-dev libreadline-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev libxslt1-dev rustc libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 libncurses5-dev libncursesw5-dev chromium-chromedriver\n\nversion=3.8.8\n\nwget https://www.python.org/ftp/python/$version/Python-$version.tgz\n\ntar zxf Python-$version.tgz\ncd Python-$version\n./configure --enable-optimizations\nmake -j4\nsudo make altinstall\n\ncd ..\n\nsudo python3.8 -m pip install --upgrade pip\n\ngit clone https://github.com/Hari-Nagarajan/fairgame\ncd fairgame/\npip3 install pipenv\nexport PATH=$PATH:/home/$USER/.local/bin\npipenv shell \npipenv install\ncp /usr/bin/chromedriver /home/$USER/.local/share/virtualenvs/fairgame-\u003cRANDOMCHARS\u003e/lib/python3.8/site-packages/chromedriver_py/chromedriver_linux64\n```\n\nLeave this Terminal window open.\n\nOpen the following file in a text editor:\n\n`/home/$USER/.local/share/virtualenvs/fairgame-\u003cRANDOMCHARS\u003e/lib/python3.8/site-packages/selenium/webdriver/common/service.py`\n\nEdit line 38 from\n\n`self.path = executable`\n\nto\n\n`self.path = \"chromedriver\"`\n\nThen save and close the file.\n\nBack in the terminal you kept open, under the fairgame folder you can now type `pipenv run python app.py amazon` and run the bot, or add any flags after you wish to use like `--headless` or `--delay x` to make `pipenv run python app.py amazon --headless --delay 4`\n\nBasis for the above directions can be found [here](https://docs.google.com/document/d/1VUxXhATZ8sZOJxdh3AIY6OGqwLRmrAcPikKZAwphIE8/edit)\n\n# Advanced Configuration \n## Notifications\n\n### Sounds\n\nLocal sounds are provided as a means to give you audible cues to what is happening. The notification sound plays for\nnotable events (e.g., start up, product found for purchase) during the scans. An alarm notification will play when user\ninteraction is necessary. This is typically when all automated options have been exhausted. Lastly, a purchase\nnotification sound will play if the bot if successful. These local sounds can be disabled via the command-line\nand [tested](#testing-notifications) along with other notification methods\n#### Attribution\nNotification sound from https://notificationsounds.com.\n\n### Apprise\n\nNotifications are now handled by Apprise. Apprise lets you send notifications to a large number of supported\nnotification services. Check https://github.com/caronc/apprise/wiki for a detailed list.\n\nTo enable Apprise notifications, make a copy of `apprise.conf_template` in the `config` directory and name it\n`apprise.conf`. Then add apprise formatted urls for your desired notification services as simple text entries in the\nconfig file. Any recognized notification services will be reported on app start.\n\n#### Apprise Example Config:\n\n```\n# Hash Tags denote comment lines and blank lines are allowed\n# Discord (https://github.com/caronc/apprise/wiki/Notify_discord)\n\nhttps://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}\n\n# Telegram\ntgram://{bot_token}/{chat_id}/\n\n\n# Slack (https://github.com/caronc/apprise/wiki/Notify_slack)\nhttps://hooks.slack.com/services/{tokenA}/{tokenB}/{tokenC}\n\n```\n\n### Testing notifications\n\nOnce you have setup your `apprise_config.json ` you can test it by running `python app.py test-notifications` from\nwithin your pipenv shell. This will send a test notification to all configured notification services.\n\n## CLI Tools\n\n### CDN Endpoints\n\nThe `find-endpoints` tool is designed to help you understand how many website domain endpoints exist for your geography\nbased on global Content Delivery Networks (CDNs) and your specific network provider. Its purpose is nothing more than to\neducate you about variability of the network depending on how your computer resolves a domain. Doing something useful\nwith this knowledge is beyond the scope of this feature.\n\n```shell\nUsage: app.py find-endpoints [OPTIONS]\n\nOptions:\n  --domain TEXT  Specify the domain you want to find endpoints for (e.g.\n                 www.amazon.de, www.amazon.com, smile.amazon.com.\n\n  --help         Show this message and exit.\n```\n\nSpecifying a domain (e.g. www.amazon.com, www.amazon.es, www.google.com, etc.) will generate a list of IP addresses that\nvarious public name servers resolve the name to. Hopefully this is helpful in understanding the variable nature of the\ncontent that different people see.\n\n### Routes\n\nThe `show_traceroutes` tool is simply a tool that attempts to generate the commands necessary to determine the various\npaths that the Fairgame could take to get to a domain, based on who is resolving the domain to an IP.\nIt uses the [end points](#cdn-endpoints) tool to convert a domain name to the various IPs and generates a list of\ncommands you can copy and paste into the console to compare routes.\n\n```shell\nUsage: app.py show-traceroutes [OPTIONS]\n\nOptions:\n  --domain TEXT  Specify the domain you want to generate traceroute commands for.\n\n  --help         Show this message and exit.\n```\n\nThis is intended for people who feel that they can modify their network situation such that the fastest route is used.\nExplaining the Internet and how routing works is beyond the scope of this command, this tool, this project, and the\ndevelopers.\n\n# Issues Running FairGame \n## Known Issues\n* DO NOT change the zoom setting of the browser (it must be at 100%). Selenium doesn't work with the zoom at any other setting.\n* \n* Pipenv does not like spaces in file paths, so you will either need to run from a place where you do not have spaces \n  in the file path, or set the option for pipenv to run locally in relation to the current file directory with:\n```shell\nset PIPENV_VENV_IN_PROJECT=1 (Windows) \nexport PIPENV_VENV_IN_PROJECT=1 (Linux/Other)\n```\n\n* Running the bot's Chrome browser minimized can cause time out errors due to how Selenium acts with various versions of Chrome. \n\n* One time passcode (OTP) doesn't work in headless. Turn it off when starting up a headless instance, then turn \n  it back on afterwords.\n  \n* Avoid installing FairGame on OneDrive or similar cloud storage - some people have issues with this.\n\n## Troubleshooting\n\n+ Re-read this documentation.\n\n+ Verify your JSON.\n\n+ Consider joining the #tech-support channel in [Discord](https://discord.gg/5tw6UY7g44) for help from the community if\n  these common fixes don't help.\n\n+ **Error: ```selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary```**\n  The issue is that chrome is not installed in the expected location.\n  See [Selenium Wiki](https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver#requirements) and the section\n  on [overriding the Chrome binary location .](https://sites.google.com/a/chromium.org/chromedriver/capabilities#TOC-Using-a-Chrome-executable-in-a-non-standard-location)\n\n  The easy fix for this is to add an option where selenium is used (`selenium_utils.py`)\n\n  ```\n  python chrome_options.binary_location = \"C:\\Users\\%USERNAME%\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe\"\n  ```\n\n+ **Error: ```selenium.common.exceptions.SessionNotCreatedException: Message: session not created: \n  This version of ChromeDriver only supports Chrome version 90```**\n\n  You are not running the proper version of Chrome this requires. As of this update, the current version is Chrome 90.\n  Check your version by going to ```chrome://version/``` in your browser. We are going to be targeting the current stable\n  build of chrome. If you are behind, please update, if you are on a beta or canary branch, you'll have to build your own\n  version of chromedriver-py.\n\n## Frequently Asked Questions\n\nTo keep up with questions, the Discord channel [#FAQ](https://discord.gg/GEsarYKMAw) is where you'll find the latest\nanswers. If you don't find it there, ask in #tech-support.\n\n1. **Why didn't Fairgame buy this GPU that I can see in my browser?**\n   \n   If Fairgame didn't attempt to buy it, then Fairgame didn't ever see it as in stock. Many stock alert services are\n   sending out affiliate URLs that appear to cache offers for some period of time, regardless of whether or not the item\n   is still in-stock and purchaseable. Many people have reported that they can see an item as in stock in their browser\n   but Fairgame either didn't see it, failed to check out, or logged some weird error condition.\n   \n   If you are trying to purchase an Nvidia 30-series or an AMD 6000-series GPU in 2021 then this may happen frequently for you.\n   These items appear to sell out within fractions of a second and a large a mount of luck will be involved. Please do not\n   create issues or ask for help when Fairgame \"misses\" a drop or tries to checkout but can't find the item in your cart.\n   We know that it's hard to buy these things right now - that's why we're all here. Good luck!\n   \n1. **Can I run multiple instances of the bot?**\n   \n   It is possible, however we do not support running multiple instances nor any issues that may be encountered while doing so.\n   \n1. **Does Fairgame automatically bypass CAPTCHA's on the store sites?**\n   \n   The bot will try and auto-solve CAPTCHA's during the checkout process.\n   \n1. **Does `--headless` work?**\n   \n   Yes!  A community user identified the issue with the headless option while running on a Raspberry Pi. This allowed\n   the developers to update the codebase to consistently work correctly on headless server environments. Give it a try\n   and let us know if you have any issues.\n   \n1. **Does Fairgame run on a Raspberry Pi?**\n   \n   Yes, with caveats. Most people seem to have success with Raspberry Pi 4. The 2 GB model may need to run the headless\n   option due to the smaller memory footprint. Still awaiting community feedback on running on a Pi 3. CPU and memory\n   capacity seem to be the limiting factor for older Pi models. The Pi is also much slower then even a semi-recent\n   (5 years or less) laptop. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHari-Nagarajan%2Ffairgame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHari-Nagarajan%2Ffairgame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHari-Nagarajan%2Ffairgame/lists"}