S1M0N38 / soccerapi

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

Problem with competition on Bet365 #36

Open pepealessio opened 3 years ago

pepealessio commented 3 years ago

Trying to use the competition method it works fine on the other two bees, but on bet365 it returns the following error:

Traceback (most recent call last): File "c:\Users\Alessio Pepe\Desktop\api\main.py", line 4, in odds = api.competitions() File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\soccerapi\api\bet365.py", line 259, in competitions table_country = self._request( File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\soccerapi\api\bet365.py", line 308, in _request response = requests.get('http://localhost:5000/bet365').json() File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\requests\api.py", line 75, in get return request('get', url, params=params, kwargs) File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, kwargs) File "C:\Users\Alessio Pepe\Desktop\api.venv\lib\site-packages\requests\adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5000): Max retries exceeded with url: /bet365 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002A9C72223D0>: Failed to establish a new connection: [WinError 10061] Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione'))

reido2012 commented 2 years ago

Hi @pepealessio

Are you running the soccerapi-server?

I think that should solve your problem. See the Readme of this repo for more info.