amosbastian / understat

An asynchronous Python package for https://understat.com/.
MIT License
150 stars 30 forks source link

Fixtures not working? #33

Closed enadol closed 12 months ago

enadol commented 12 months ago

Greetings! The functions involving fixtures don't seem to be working. I'm running the standard code

import asyncio import json import nest_asyncio

import aiohttp

from understat import Understat

async def main(): async with aiohttp.ClientSession() as session: understat = Understat(session) fixtures= await understat.get_team_fixtures("Bayern Munich", 2022) clubmatches=json.dumps(fixtures, indent=4, ensure_ascii=False) print(clubmatches)

if name == "main": nest_asyncio.apply() loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop.run_until_complete(main())

The result is an empty list [] with no error message. I've tried also with the standard example (Manchester United, 2018). Other functions involving fixtures are giving the same result back.

I'm running the script on Anaconda, Spyder, Windows OS, Python 3.9.16. Other functions work fine. Many thanks and best regards,

enadol commented 12 months ago

Sorry, there's no upcoming fixtures in 2022. My bad. I'm closing this.