outside-edge / python-espncricinfo

Python wrapper for the ESPNCricInfo JSON API
MIT License
144 stars 65 forks source link

match.toss_decision returns null #17

Closed Ehsan1997 closed 4 years ago

Ehsan1997 commented 6 years ago

Is it just me or the toss_decision attribute is returning a null string.

Ehsan1997 commented 6 years ago

Okay, the toss_decision attribute in official cricinfo json is an empty string.

Ehsan1997 commented 6 years ago

As long as there is no fix by the cricinfo guys, one can proceed as follows, Get the team that won the toss, if the team is batting first, it elected to bat else it's fielding.

dwillis commented 6 years ago

@Ehsan1997 Good catch, yes. That rule should apply with the exception of some first-class matches in England's county championship, which now has the option of having no toss.