Skip to content

[BUG] Unable to Follow README #67

Description

@jaoxford

Hey all, trying to use this library to get some cricket data from ESPN Cricinfo.

I think they've added some kind of authentication to their API recently meaning it's impossible to scrape.

Does anybody have any ideas?

Thanks

Describe the bug
Unable to run the example from the readme

To Reproduce

>>> from espncricinfo.summary import Summary
>>> s = Summary()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jacoboxford/.virtualenvs/espncricinfo/lib/python3.12/site-packages/espncricinfo/summary.py", line 12, in __init__
    self.match_ids = self._match_ids()
                     ^^^^^^^^^^^^^^^^^
  File "/Users/jacoboxford/.virtualenvs/espncricinfo/lib/python3.12/site-packages/espncricinfo/summary.py", line 30, in _match_ids
    matches = [x['id'] for x in self.summary_json()['props']['pageProps']['data']['content']['leagueEvents'][0]['matchEvents']]
                                ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
>>>

Expected behavior

I would expect something to be returned without erroring out for me!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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