Chouffy / home_assistant_tgtg

TooGoodToGo items stock as sensor in Home Assistant
MIT License
65 stars 18 forks source link

Captcha - you have been blocked #129

Open jjmwiwi opened 1 month ago

jjmwiwi commented 1 month ago

System Health details

It seems, that tgtg has been blocked my requests to list my favorites and items. It links to https://geo.captcha-delivery.com/captcha/?initialCid.... which says: you have been blocked

Screenshot 2024-08-04 204501

Checklist

Describe the issue

you have been blocked

Reproduction steps

  1. ./tgtg_get_favorites_item_id.py
  2. ...

Debug logs

Press enter to continue ...
Traceback (most recent call last):
  File "./tgtg_get_favorites_item_id.py", line 14, in <module>
    tgtgReply = tgtgClient.get_items()
  File "/home/.local/lib/python3.8/site-packages/tgtg/__init__.py", line 274, in get_items
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'{"url":"https://geo.captcha-delivery.com/captcha/?initialCid=....

Diagnostics dump

No response

lampje25 commented 1 week ago

Exactly the same problem here!

jeje-digifab commented 1 week ago

Hello, Same problem

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tgtg/sensor.py", line 83, in setup_platform
    tgtgReply = tgtg_client.get_items()
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/tgtg/__init__.py", line 244, in get_items
    self.login()
  File "/usr/local/lib/python3.12/site-packages/tgtg/__init__.py", line 153, in login
    self._refresh_token()
  File "/usr/local/lib/python3.12/site-packages/tgtg/__init__.py", line 139, in _refresh_token
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'{"url":"https://geo.captcha-delivery.com/captcha/?initialCid=
Guillaumer2h commented 2 days ago

Same here, I tried to refresh the tokens without success