Git Product home page Git Product logo

fpl-scripts-stats's Introduction

FPL-Scripts-Stats

Scripts for Fantasy Premier League(FPL) for making some tasks easy and also to get statistics using FPL api.

This will be collection of python scripts for Fantasy Premier League

Current Features

  • Get sorted mini-league managers based on points output to console and csv file

Note: League ID is the number you see on url on your browser when you open the mini-league.

Here is example: League ID on image below is 14476 fantasy_mini_leauge_on_browser

How to run the script

  1. Install python on your system and version should be 3.6+
  2. Clone the repository or download zip available by slecting download icon with code
#clone repo
git clone https://github.com/yathomasi/FPL-Scripts-Stats.git
#change directory
cd FPL-Scripts-Stats
  1. Create Python Environment (based on your python setup, please use python or python3)
python -m venv venv #or python3 -m venv venv
#source python to environment
source venv/bin/activate
  1. Install all the python package requirements(pip or pip3 based on your setup)
pip install -r requirements.txt
  1. Copy the .env_example and rename it to .env only (use GUI if you want or here is command)
cp .env_example .env

if you open this environment file you can see two fields USERNAME and PASSWORD, currently there is a dummy account if you don't want to put yours but you can also put your account here and upon further features addition it would be better if you set your own account

  1. You are ready to run the script (eg.league_gw_sorted.py)
#for help pass -h or --help tag
python league_gw_sorted.py -h
#provide leagues id by using -l or --league tag and you can even pass multiple league id
python league_gw_sorted.py -l 1234 2345
#by default it also prints table to console you can disable by passing -nt or --no-table tag
python league_gw_sorted.py -l 1123 -nt
# for no of players stat
 python get_picks_teams.py -g 7 -t 1234 2345
  1. Find the respective Gameweek folder name GW and you will find the exported csv file and also by defaults you can see printed table on console too

TODO features

  • get sorted gw file for all the mini-league on my account

Contributing

  1. You can open issue if you find some error or want some help or contact directly to me at @yathomasi
  2. Pull request are always welcome
  3. If you have any idea and you want that to be implemented we can add that to our TODO.

Thanks

Thanks @amosbastian for fpl a python wrapper for the api

fpl-scripts-stats's People

Contributors

yathomasi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sanjeevsanjeev

fpl-scripts-stats's Issues

[SSL: CERTIFICATE_VERIFY_FAILED]

Hello!
I ran this totally fine all of last season, and when I try and run it now I keep getting an SSL cert issue, here is the full error:

โ†[?25hError occured
ERROR:root:<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>

Any ideas? I tried manually downloading the cert in ie and some other stuff I found on stackoverflow but no luck

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.