S1M0N38 / soccerapi

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

Odds delay #10

Closed camwardy closed 4 years ago

camwardy commented 4 years ago

Hi,

Firstly thank you for making this, it's proving very helpful to my project!

I was wondering how large the delay is between the api and the live bet365 odds, since I am receiving different odds to those on the website.

Thanks

camwardy commented 4 years ago

I'm also getting the following error when using the bet365api, the 888sport and unibet apis work perfectly:

File "C:\Users\Admin\Documents\Code\soccerapi-master\soccerapi\api\bet365\bet365.py", line 76, in _parse_odds key = self._guess_xor_key(values[0]) IndexError: list index out of range

values is returning an empty list as 'OD' cannot be found in the data variable.

S1M0N38 commented 4 years ago

Regarding the delay of the odds I have no clue: they should be the latest odds available. However the odds are different (and sometime by quite a margin) if bet365.com is access from different country.

The second issue that you are experiencing it's related to the way that data coming from bet356 are parsed. At every requests the api naively brute force the char that is used in the xor data obfuscation and then reverse the obfuscation. Probably they change something in the obfuscation procedure and now the whole method fail.

I'm currently not maintain this project but there is a repo that is parsing bet365 data: take a look, could be a useful resource to fix this problem.

camwardy commented 4 years ago

Hi, thanks for the reply. I looked at the repo you linked and it looks like bet365 have changed the way they cipher their xor data, making it increasingly harder for applications like this to access their odds data.

S1M0N38 commented 4 years ago

Duplicate of #11