Python scripts for scraping data from the MPG (Mon Petit Gazon) website.
This Python script is designed to scrape data from the MPG (Mon Petit Gazon) website, allowing you to extract and analyze various statistics related to your fantasy football leagues. It utilizes the requests
library for making HTTP requests and BeautifulSoup
for parsing HTML.
The aim of this project is to provide new metrics for your seasons, so you'll finally know if your opponent has a mirror left, or who was the luckiest last season!
Before using the script, make sure you have the following installed:
- Python (version 3.10 or higher)
- An MPG league
- Clone the repository:
git clone https://github.com/yourusername/mpg-football-scraper.git
cd mpg-football-scraper
- Install dependencies:
pip install -r requirements.txt
Before running the script, update the config/config_example.json
file with your MPG credentials:
-- TO DO --
Add an explanation of each parameter in the json file.
Then rename it config.json
.
Make sure to keep your credentials secure and do not share them publicly, even if it already takes me enough time to make my teams so I won't go and make yours if I get your credentials...
Run the script by executing the following command:
python scraper.py
This will authenticate your account on MPG and retrieve data from the specified league.
Here is the database architecture :
This project is unlicensed, but don't hesitate to contact me if you have any problems using it :)