Giter VIP home page Giter VIP logo

sofa-score-scraper's Introduction

SofaScoreScraper

Python scraping scripts to retrieve LaLiga player and match statistics

Prerequisites

You can find a Python (3.5.2) virtual environment ready to go in the env_spotahome folder containing all of the required packages

You can find a list of all required packackes in requirements.txt

beautifulsoup4==4.6.0
certifi==2018.1.18
chardet==3.0.4
idna==2.6
lxml==4.1.1
pytz==2018.3
requests==2.18.4

Getting all LaLiga player information

In order to obtain a CSV containing all basic data of LaLiga players run:

python player_scraper.py

This will save all the data in a file called players.csv in the current directory

This script also downloads each player's photo (if available) into a directory called /players

Getting individual player statistics from LaLiga matches

In order to obtain the individual player statistics from one or more LaLiga matches, you must provide the match_stats_scraper.py script with a list of links to the corresponding webpages in SofaScore.

Go to line 444 and enter the desired links into the 'links' list.

Run:

python match_stats_scraper.py

This will save all the data in a file called totalStats.csv in the current directory

Built With

Authors

sofa-score-scraper's People

Contributors

urbistondo 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.