New player endpoint for major_teams #62
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Player Object Update - Major Teams (_major_teams)
This attempts to fix issue [BUG] Player class is not working with Python 3.11.0 #59
The ESPN Cricinfo html page has been updated with class and syntax changes which mean the previous _major_teams function did not work:
There is a new endpoint which the ESPN Cricinfo page appears to utilise for player data (or in conjunction with the previous). Example: (https://hs-consumer-api.espncricinfo.com/v1/pages/player/home?playerId=7069)
This provides similar data to the previous endpoint, however there are some differences. For this reason I have only modified the major_teams function with this in order to get it functional (with which the rest are).
Eventually it would most likely be wise to update the rest of the functions to the latest 'endpoint' but for now this fixes previous problems.