Skip to content

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

@saahilp

Description

@saahilp

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions