outside-edge / python-espncricinfo

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

Match.all_innings no longer working. #39

Closed olibpool closed 3 years ago

olibpool commented 3 years ago

Firstly, great repo has been very useful in making my small cricket website, thank you.

I have a sqlite database of all player innings in Test and ODI cricket and have been using your module to import the data, using the Match class and then .all_innings to gather all the data from the match. It was definitely working a few weeks ago but now has broken.

It used to produce a dictionary of all the innings in a match but now only returns Nonetype regardless of the match.

To Reproduce Steps to reproduce the behavior:

from espncricinfo.match import Match

m = Match(1225248)

# 1225248 is the number for the second test for Eng v Windies 2020

print(m.all_innings)

Expected behavior It should print out all the info from each innings in the game, including info about each player's individual innings.

Screenshots Here's a screenshot of the above code in action.

Screenshot 2020-09-10 at 23 00 39
ckola commented 3 years ago

I have a fix for this. @dwillis Let me know i can push my changes.

dwillis commented 3 years ago

@olibpool @ckola this should be fixed now.