Guess the player based on his club career
- Python 3.11 (to use another version you should modify the .toml or execute a
poetry init
)
- Create a virtual environment
python3.11 -m venv .venv
- Activate the virtual environment
source .venv/bin/activate
- Install dependencies
poetry install
- Run scraper and cleaning code
python3 flashscore2.py
Returns players.csv
python3 clean.py
Returns players.json
All you need to do is download the Excel file foot_career_quiz
- Press F9 to load a career
- Guess the player from the dropdown list
- Press Shift+F9 to check
- Try it all again
I am using
- Wikipedia-API: an easy to use Python wrapper for Wikipedias’ API
- requests: to handle requests
- BeautifulSoup: to parse HTML documents
- A list of players from the fifa100
- For each player:
- I get the Wiki page
- Parse the section "Club Career"
- Put it all together in a dataframe with other infos like Position and the birth year