Skip to main content

Extract text from a YouTube video in a single command, using OpenAi's Whisper speech recognition model

Project description

lol-stats

Python script to find your League of Legends ranked statistics across all of your accounts. This script finds your all time ranked statistics (Season 1 to Season 13) across all of your accounts and merges them. You will see your:

  • Total Games
  • Total Wins
  • Total Loses
  • Win rate
  • Average kills
  • Average deaths
  • Average assists
  • Average KDA
  • Average gold
  • Average CS
  • Most kills in game
  • Most deaths in a game
  • Total double,triple, quadra and penta kills
  • Average damage dealt
  • Average damage received

for each champion and a grand total.

Installation

pip install lol-stats

Google Chrome must be installed on your system. The program automatically installs ChromeDriver binaries required for Selenium web scrapping.

Usage

Lauch the program:

import lol_stats

lol_stats.launch()

In console you'll see that the program is launched. Go to http://localhost:8126 from a browser to interact with the program.

To run the program on a different port, you pass an optional argument to launch() function:

lol_stats.launch(port=1234)
  • Enter all of your LOL accounts and their servers (euw, na, tr, kr etc.) and press "Submit". You can submit without any account to see an example result (Faker's account "Hide on bush" 😀)
  • Now you should see "Gathering data for x accounts" and the program is working. You can see the progress in Python program's console. Each time a season data for an account is fetched, it is printed to the console. The program should usually take 20-60 seconds.
  • Upon completion, you'll see the results in your browser. You can also download them using the "Download CSV" button. Python will automatically download it as result.csv for your convenience.
  • If you want to rerun it for different accounts, refresh the browser.

Note: The program is multithreaded to process multiple accounts as quickly as possible. This may cause high CPU and RAM usage, which is normal.

Example Output

How it works

The program uses Selenium for web scrapping. It opens Google Chrome in background, visits op.gg page for each account and scrapes the data. Since op.gg doesn't provide an API for fast data retrieval, the only option is physically visiting it from browser. This is why the program is resource-intensive and can take some time.

Notes

  • The program fetches data from op.gg. If op.gg is unavailable the program won't work. If the data on op.gg is wrong so will be the program's results.

  • Sometimes it takes long for op.gg to respond. In that case you may need to wait for 5-10 minutes, or you can try again later. Track the progress from Python console, it should print the progress like:

Data for accounts:
https://www.op.gg/summoners/kr/hide%20on%20bush/champions
started processing
installing chromedriver
installed chromedriver
concurrent execution
started https://www.op.gg/summoners/kr/hide%20on%20bush/champions
Page is fully loaded.
time=  0.1226658821105957 seconds
1
hide_on_bush
Recorded Season 2023 S2 for https://www.op.gg/summoners/kr/hide%20on%20bush/champions
time=  0.705498218536377 seconds
2
hide_on_bush
Recorded Season 2023 S1 for https://www.op.gg/summoners/kr/hide%20on%20bush/champions
time=  0.6393542289733887 seconds
...
--- 18.60 seconds ---
ENDED !

Contact

Raise an issue on the GitHub repo: https://github.com/atahanuz/lol-stats/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lol-stats-1.0.1.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lol_stats-1.0.1-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file lol-stats-1.0.1.tar.gz.

File metadata

  • Download URL: lol-stats-1.0.1.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for lol-stats-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a730bc99d767d7992eb000591f953acb493b00ce9b61bd989e20ef72e78e7efc
MD5 3e145bf59bc5e4b5b93059a6b977922c
BLAKE2b-256 73e5c7a792b4d019202a7ebdcb2edd5f35f4a6199431e618899cbdb38218ffbd

See more details on using hashes here.

File details

Details for the file lol_stats-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: lol_stats-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for lol_stats-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 097369b03913b090ce084edca130e2043c6216a220c74a66fe52dce5b3605d77
MD5 9f0033f09b583ee58db3543025ffba5e
BLAKE2b-256 c1cc9e9bbd1dc18d6ef4371e7e9058899e2813246f963bcec680d039d12d050e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page