Packages uses BeautifulSoup API to scrape historical data from ufcstat.com
Project description
UFC_Data_Scraper
UFC_Data_Scraper uses Beautiful Soup API to scrape fight and fighter data from ufcstats.com and returns data in a JSON format.
Install
To install UFC_Data_Scraper:
pip install UFC_Data_Scraper
Usage
Step 1
Create instance of Ufc_Data_Scraper object:
scraper = s.Ufc_Data_Scraper()
Step 2
Choose class method for getting fighter or Fights data:
list_of_fighters = scraper.get_all_fighters()
or
list_of_fights = scraper.scrape_all_fights()
Step 3
Convert from list of fighter or fight objects into list of dictionaries:
json_fighter_list = s.Ufc_Data_Scraper().fighter_to_Json(list_of_fighters)
or
json_fights_list = s.Ufc_Data_Scraper().fights_to_Json(list_of_fights)
Step 4
Save dictionaries into Json:
s.Ufc_Data_Scraper().save_json("<name of JSON file>", json_fighter_list)
JSON Format
The format of both fighter and fight data saved to .json files are described in JSON_spec folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file UFC_Data_Scraper-1.0.0.tar.gz.
File metadata
- Download URL: UFC_Data_Scraper-1.0.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71f9855610dce616da3c76d3d224d206181ead7348fcab8a968ade846c8d556d
|
|
| MD5 |
4bedcd47f1d3963d8e6c5169be2e4538
|
|
| BLAKE2b-256 |
46b833b54731dabc8fb430dc3c7b1d495399f8403290651447e3f1e4cc37263a
|
File details
Details for the file UFC_Data_Scraper-1.0.0-py3-none-any.whl.
File metadata
- Download URL: UFC_Data_Scraper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9be0f86613970df34f9eb5c089bf2e121cba0dc626ce3cf30cb95f7ad3e37de2
|
|
| MD5 |
1b0a15e53ea358ff1e9e954f19c27a71
|
|
| BLAKE2b-256 |
36807e4d4659cfa5f60ba364b0b639056776e80c15b962dfde17c341879a20ae
|