GithubHelp home page GithubHelp logo

murphyjohn / fpl-data-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fez09/fpl-data-scraper

0.0 1.0 0.0 118 KB

Exports fantasy premier league season history to excel workbook

Python 100.00%

fpl-data-scraper's Introduction

Fantasy Premier League Data Fetcher

Code was written in Python 3. I chose python since I just started learning it a couple of months ago and the openpyxl module is a way to export data to excel sheets.

Executing the script prompts a GUI interface asking the user to enter their fantasy team ID. This can be found easily on the wesite. Clicking the submit button then proceeds to import all json data from the website and exporting it to excel.

Youtube tutorial: https://youtu.be/z-U3RSlvmEw

Requirements

Whatever is required by the openpyxl and tkinter modules, ie,

  • Windows/Mac device (The app won't work on Mac since I used pyinstaller on Windows to generate the executable. However you should still be able to run the code on a Mac device if you have Python)
  • Microsoft Excel 2010 or newer

Modules Used

  • tkinter - for GUI
  • requests - to fetch json data from FPL website
  • openpyxl - to write the imported data to excel workbook
  • os - to show the path of the created excel file
  • I've also used urlopen and bas64 to read the FPL logo off of an imgur link to place it in the GUI

List of data imported

  • Gameweek Score
  • Gameweek Average Score
  • Points Benched
  • Transfers Made for GW
  • Transfer Cost
  • Gameweek Rank
  • Overall Points
  • Overall Rank
  • Position in overall leaderboard
  • Team Value
  • Weekly Squad
  • Chips Used and when
  • Complete Transfer history with values
  • Final Dream Team
  • FPL Cup history
  • Classic League Ranks
  • H2H Ranks
  • Individual player scores for each GW
  • Weekly Dream Team

Json links

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.