Giter Club home page Giter Club logo

sherdogscraper's Introduction

This is a reusable python library for scraping Event and Fighter info from Sherdog.com. Revised for compatibility for 2/10/12 Sherdog design changes.

Usage (after dropping in SherdogScraper.py and importing):

s = new Sherdog(log) # 'log' is any implementation of a logger...must have a .log(str) method


s.getFighterDetails(2326) # This is Mirko Filipovic, note the ID from his Sherdog page: http://www.sherdog.com/fighter/Mirko-Filipovic-2326

# Data retrieved from this call:
# Retrieved URL: http://www.sherdog.com/events/X-18346
# Title: UFC 141 - Lesnar vs. Overeem
# Promotion: Ultimate Fighting Championship
# Date: 2011-12-30
# Venue: MGM Grand Garden Arena
# City: Las Vegas, Nevada, United States
# Fight 1: 25981 vs. 5185 = winner: 25981
# Fight 2: 24765 vs. 16555 = winner: 24765
# Fight 3: 16374 vs. 573 = winner: 16374
# Fight 4: 26070 vs. 7540 = winner: 26070
# Fight 5: 11884 vs. 10380 = winner: 11884
# Fight 6: 48046 vs. 5778 = winner: 48046
# Fight 7: 26162 vs. 435 = winner: 26162
# Fight 8: 24539 vs. 4865 = winner: 24539
# Fight 9: 11451 vs. 15105 = winner: 11451
# Fight 10: 461 vs. 17522 = winner: 461


s.getEventDetails(18346) # This is UFC 141, note the ID from the Sherdog page: sherdog.com/events/UFC-141-Lesnar-vs-Overeem-18346   

# Data retrieved from this call:
# Retrieved URL: http://www.sherdog.com/fighter/X-2326
# Name: Mirko Filipovic
# Nickname: Cro Cop
# Association: Cro Cop Squad Gym
# Height: 6'2" (188cm)
# Weight: 227lbs (103kg)
# DOB: 10-09-1974
# City: Zagreb
# Country: Croatia


s.getFighterSearch('6', 'mitchell')
# First param is weightClass, the possible values are here:
# 11 = Catch Weight
#	10 = Flyweight
#	9 = Bantamweight
#	7 = Featherweight
#	8 = Pound for Pound
#	6 = Lightweight
#	5 = Welterweight
#	4 = Middleweight
#	3 = Light Heavyweight
#	2 = Heavyweight
#	1 = Super Heavyweight
# 
# Retrieved URL: http://www.sherdog.com/stats/fightfinder?weight=6&SearchTxt=mitchell
# Fields returned: ID, Date, Title, Location

sherdogscraper's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hugsnotpugs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.