Code Monkey home page Code Monkey logo

esportscapsulefarmer's Introduction

League of Poro's Esports Capsule Farmer

Are you tired of watching professional League of Legends games? Do you watch only for the drops?

This tool makes the Chrome browser watch the matches for you!

Features

  • Checks for new live matches
  • Closes finished matches
  • Automatically logs user in
  • Runs in background
  • Multiple accounts
  • Sets Twitch quality to the lowest possible
  • Checks for the Rewards check mark
  • Experimental support for Firefox and Edge

Video Tutorial

(Outdated, will be updated in the future)

Tutorial

Total alerts Language grade: Python

Installation (simple)

⚠️ This project utilizes the Google Chrome browser by default. However, there's an experimental support for Firefox and Edge (see Configuration or CLI if you want to use alternative browsers). Please make sure you have the selected browser installed!

  1. Download and run the latest CapsuleFarmer.zip from Releases tab
  2. Extract the archive
  3. (Optional) Edit the configuration file with a text editor (e.g. Notepad) - see Configuration for details
  4. Run CapsuleFarmer.exe
  5. If you do not use the autologin feature - log into your account

Note: I am using Google Chrome + automatic login + headless. This will be the most stable and preferred configuration.

Configuration

⚠️ The configuration file (config.yaml) MUST be present in the SAME folder as the executable! To use non-default path, see CLI.

Default configuration:

headless: false
autologin:
  enable: false

If you wish to enable automatic login and to run the browser in the background:

headless: true
autologin:
  enable: true
  username: "YourUsername"
  password: "YourPassword"

Experimental support for alternative browsers (default: chrome):

browser: firefox # Other options: chrome, edge

Set delay in seconds between checks for new matches (default: 600):

delay: 600

Multiple accounts

The program supports multiple accounts by default. However, if you want to use the automatic login + headless mode, the best method to start the program is to use the included batch script.

⚠️ Run the CapsuleFarmer.exe at least once before you attempt to use multiple accounts. Otherwise every instance will try to download the WebDriver and bad things WILL happen.

  1. Create configuration file for each account
  2. Open the example combine.bat in a text editor
  3. For each account, add path to the account's config file, e.g. START CapsuleFarmer.exe -c config.account1.yaml
  4. Run the .bat script

Common Errors/Issues

  • My username/password contains special characters and the program cannot login automatically
    • Do you have quotes arund the username/password? Correct: password: "P@$$w0rd"; Incorrect: password: P@$$w0rd
  • The Riot Account login page is not loading
    • Simply refresh the page a bunch of times. This is an issue with the website, not the program.
  • There are warnings / errors but the program runs fine
    • You can ignore them. These are most of the time Chrome related warnings and errors. As long as the program runs fine, you can ignore them.
  • Program crashes immediately
    Traceback (most recent call last):
    File "main.py", line 73, in <module>
    File "chromedriver_autoinstaller\__init__.py", line 20, in install
    File "chromedriver_autoinstaller\utils.py", line 195, in download_chromedriver
    File "chromedriver_autoinstaller\utils.py", line 118, in get_chrome_version
    IndexError: list index out of range
    [7016] Failed to execute script 'main' due to unhandled exception!
    
    • You don't have Google Chrome installed.
  • It doesn't work

CLI

usage: CapsuleFarmer.exe [-h] [-b {chrome,firefox,edge}] [-c CONFIGPATH] [-d DELAY]

Farm Esports Capsules by watching lolesports.com.

options:
  -h, --help            show this help message and exit
  -b {chrome,firefox,edge}, --browser {chrome,firefox,edge}
                        Select one of the supported browsers
  -c CONFIGPATH, --config CONFIGPATH
                        Path to a custom config file
  -d DELAY, --delay DELAY
                        Time spent sleeping between match checking (in seconds)

Installation (advanced)

Prerequisities

  • Python >= 3.10.1
  • pipenv (pip install pipenv)

Step by step

  1. Clone this repo - git clone https://github.com/LeagueOfPoro/EsportsCapsuleFarmer.git
  2. Move to the directory - cd EsportsCapsuleFarmer
  3. Install the Python virtual environment - pipenv install
  4. (Optional) Edit the configuration file
  5. Run the tool - pipenv run python ./main.py

Create EXE

  1. pipenv install --dev
  2. pipenv run pyinstaller -F --icon=poro.ico ./main.py

Forks

Dockerized version for Raspbery Pi by kacperkr90

Support my work

Become a channel member on YouTube

esportscapsulefarmer's People

Contributors

alepouna avatar christmaspika avatar d14rn avatar dimitrisz123 avatar djordykoert avatar frostypowerup avatar leagueofporo avatar marvinscham avatar mrbartusek avatar rwbychan avatar tj717 avatar xmatador-git 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.