ahivert/tgtg-python

No results anymore after some time of continuous usage (reopened)

Closed this issue · 5 comments

I was not able to reopen ticket #116

This problem still persists.
Items in the response of the api are not the same as in the app after some time. Around one item a day is returned by the api.

A new login via mail confirmation, without refresh token fixes this. But only for some time.

Around one item a day is returned by the api.

You mean there is only one item returned for the whole request, or only one changed?


Had some strange occurrence a few days ago, which might be similar to this. One item reported 17 portions of stock, but the app said 0 portions available.

DL6ER commented

For what it's worth: I'm querying the API for three different locations like

for loc in locations:
  client.get_items(favorites_only=False, latitude=loc[0], longitude=loc[1], radius=max_radius)

with a fixed delay of 30 seconds between the individual queries so every location is queries like 45 times per hour as there are a few excellent offers that are sold out within a few minutes otherwise.

My script is running non-stop for 26 days by now and I don't see any issues. All shops/offers I expect are returned. As we live in a rather rural area, I know all of them (about 10-15 per searched radius) and would have immediately realized their absence.

You could try to update the version inside user agent when building the client.

Currently tgtg-python use 21.9.3 but 21.12.1 is available on playstore so you can build the client like this:

client = TgtgClient(..., user_agent="TGTG/21.12.1 Dalvik/2.1.0 (Linux; U; Android 7.0; SM-G935F Build/NRD90M)")
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.