Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

UFC_Data_Scraper-1.0.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

UFC_Data_Scraper-1.0.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

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

Hashes for UFC_Data_Scraper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 71f9855610dce616da3c76d3d224d206181ead7348fcab8a968ade846c8d556d
MD5 4bedcd47f1d3963d8e6c5169be2e4538
BLAKE2b-256 46b833b54731dabc8fb430dc3c7b1d495399f8403290651447e3f1e4cc37263a

See more details on using hashes here.

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

Hashes for UFC_Data_Scraper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9be0f86613970df34f9eb5c089bf2e121cba0dc626ce3cf30cb95f7ad3e37de2
MD5 1b0a15e53ea358ff1e9e954f19c27a71
BLAKE2b-256 36807e4d4659cfa5f60ba364b0b639056776e80c15b962dfde17c341879a20ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page