This sript used BeautifulSoup to scrape data from ufcstats.com. Simply run main.py, and it will scrape data from ufcstats.com into the following four tables:
- UFC Events
- UFC Fights
- UFC Fight Stats
- UFC Fighters
Each table is saved as a csv file. Each time you run the script run, it will update the existing files with any new fights/fighters.
I created this script to make my own dataset to upload to Kaggle, which you can find here:
I also used this data for my first data analysis project, which looks at how gender affects fight stats:
This is my first attempt at creating a web-scraping script, so any feedback is appreciated!