S1M0N38 / soccerapi

soccerapi, an unambitious soccer odds scraper ⚽️
MIT License
161 stars 36 forks source link

Assertion error when odds are not available #22

Open cardchase opened 3 years ago

cardchase commented 3 years ago

When odds are not available for any event due to it being postponed or cancelled or the fact that the event is listed on the website but the odds and/or the category is not available, the odds are returned in the list as 'None' and since they are parsed as type:int and len ( )/3 and hence, returned as assertion error. Can you please build an error handling/ignore into the bet365.py? I have come across this issue many times and the only way to move on is to avoid the league altogether which is not the best of ways to go

image

S1M0N38 commented 3 years ago

I found that this kind of errors also occur when some events are live. At this moment I fix this issue for such situations. When I will encounter the kind of error you pointed out I'll take actions (so I keep this issue open)