toogoodtogo-ha-mqtt-bridge icon indicating copy to clipboard operation
toogoodtogo-ha-mqtt-bridge copied to clipboard

Get banned every week

Open crydante opened this issue 2 years ago • 10 comments

I live in France and every week i am banned. If i reboot my modem, with a new IP it works again.

My config is :

language: en-US polling_schedule: "*/20 * * * *" intense_fetch_interval: 30 intense_fetch_period_of_time: 5

In the log i have this error :

Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/app/toogoodtogo_ha_mqtt_bridge/main.py", line 303, in fetch_loop if not check(): File "/app/toogoodtogo_ha_mqtt_bridge/main.py", line 46, in check shops = tgtg_client.get_items(page_size=400) File "/usr/local/lib/python3.8/site-packages/tgtg/init.py", line 256, in get_items raise TgtgAPIError(response.status_code, response.content) tgtg.exceptions.TgtgAPIError: (403, b'

apptoogoodtogo.com

Please enable JS and disable any ad blocker

crydante avatar Nov 10 '22 08:11 crydante

Let the api cool down over night. My cron looks like this and I never get banned:

"polling_schedule": "*/2 8-19 * * *", "intense_fetch": {"interval": 30, "period_of_time": 1}

Dielee avatar Nov 11 '22 12:11 Dielee

Thank you i will try this

crydante avatar Nov 11 '22 14:11 crydante

Get banned again :

polling_schedule: "*/10 7-20 * * *" intense_fetch_interval: 30 intense_fetch_period_of_time: 1

crydante avatar Nov 14 '22 10:11 crydante

Are you running multiple tgtg bridges ?

Dielee avatar Nov 14 '22 10:11 Dielee

No, i run only one on my home assistant on a raspberry pi and my IOS app is still working with Home Wifi

crydante avatar Nov 14 '22 10:11 crydante

All my settings :

2022-11-14_11h38_03

Maybe language parameter is important to not be banned. In language i wrote "fr-FR" i will try with "fr".

crydante avatar Nov 14 '22 10:11 crydante

Yes, please try this

Dielee avatar Nov 14 '22 10:11 Dielee

Any update on this? I got the same error.

JoRosk avatar Jan 21 '23 16:01 JoRosk

Can someone better explain how the intense fetch works?

fsa317 avatar Jan 27 '23 14:01 fsa317

Any update on this? I got the same error.

It's still some kind of ~magic~ blackbox how these rate limiter works. As far as I can tell, I get banned too, when running multiple instances at the same time.


Can someone better explain how the intense fetch works?

What is your question in detail?

There are some words written here: https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge#tgtgintense_fetch-optional

MaxWinterstein avatar Jan 27 '23 15:01 MaxWinterstein