Skip to main content

Python wrapper for Cricket live score from www.cricbuzz.com

Project description

# criclive
Python wrapper for Live cricket score from www.cricbuzz.com

# Methods
Its very simple :eyes: There are three methods are in this package.

1. Get the details match/score details in json format
* get_live_score()

2. Get the match description/type.

* match_data()

3. Get the specific match details
* get_match()

## :checkered_flag: .... !

![methods1](https://cloud.githubusercontent.com/assets/8171465/20470648/78e317e2-afd0-11e6-857c-33f33f081af5.png)


# How methods are working :eyeglasses: ?

``` python
In [1]: from criclive.livecricket import Cricz
In [2]: cricket = Cricz()
In [3]: cricket_live = cricket.
cricket.get_live_score cricket.get_match cricket.match_data

###### Cricket detaild Live Data
In [4]: cricket_live = cricket.get_live_score()
In [5]: cricket_live
In [5]: output in json format
Out[6]:
{'data': [{u'match_1': [{'batteam_score': {'bt_score': [{'decl': u'0',
'desc': u'2nd Inns',
'followon': u'0',
'overs': u'59.5',
'run': u'87',
'wkts': u'2'},
--------
}}]}}

###### Match Details
In [7]: match = cricket.match_data()
Out[7]:
{'result': [{'desc': u'IND vs ENG',
'match_id': u'match_1',
'match_no': u'2nd Test',
'type': u'TEST'},
{'desc': u'ZIM vs SL',
'match_id': u'match_4',
'match_no': u'4th Match',
'type': u'ODI'},
{'desc': u'KEN vs HK',
'match_id': u'match_11',
'match_no': u'30th Match',
'type': u'ODI'}]}

####### Get Match detail with 'match_id'
'''' pass arguments match_id to the get_match(match_id) method ''''
In [8]: match = cricket.get_match('match_1')
In [9]: match
Out[9]:
{'result': [{u'match_1': [{'batteam_score': {'bt_score': [{'decl': u'0',
'desc': u'2nd Inns',
'followon': u'0',
'overs': u'63',
'run': u'92',
'wkts': u'2'},
{'decl': u'0',
'desc': u'1st Inns',
'followon': u'0',
'overs': u'102.5',
'run': u'255',
'wkts': u'10'}]},
'bowteam_score': {'bw_score': [{'decl': u'0',
'desc': u'2nd Inns',
'followon': u'0',
'overs': u'63.1',
'run': u'204',
'wkts': u'10'},
{'decl': u'0',
'desc': u'1st Inns',
'followon': u'0',
'overs': u'129.4',
'run': u'455',
'wkts': u'10'}]},
'bt_name': u'ENG',
'bwl_team': u'IND',
'match_data': {'country': u'India',
'desc': u'IND vs ENG',
'ground': u'Dr. Y.S. Rajasekhara Reddy ACA-VDCA Cricket Stadium',
'inngscount': u'4',
'match_id': u'1',
'match_no': u'2nd Test',
'type': u'TEST',
'venue': u'Visakhapatnam'},
'match_state': {'WhoToss': u'Ind',
'other': u'',
'session': u'Day 5: First Session',
'state': u'inprogress',
'status': u'Eng need 313 runs'}}]}]}

Project details


Supported by

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