outside-edge / python-espncricinfo

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

[BUG] Unable to get a player's stats data #64

Open saahilp opened 5 months ago

saahilp commented 5 months ago

Describe the bug get_data() method in Player class returns a 403 when it tries to access the html page

To Reproduce p = Player(47270) print(p.get_data(None, 1, 'batting', 'match'))

Expected behavior Should be able to access the html page and cotinue with the parsing process.

Screenshots I've put a print command to show the contents of the html page

image

This is what the output and stack trace is.

image

The Response <403> is the output from printing the HTML.

Additional context I'm guessing this is espncricinfo blocking odd requests not coming from browsers? Is there a way to get around this?

RNerd12 commented 4 months ago

should be able to use a driver that is recognized as a user