Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Manage user_agent in a smarter way #31

Closed
Chouffy opened this issue Jun 17, 2022 · 9 comments
Closed

[Improvement] Manage user_agent in a smarter way #31

Chouffy opened this issue Jun 17, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@Chouffy
Copy link
Owner

Chouffy commented Jun 17, 2022

  • Situation: user_agent is either defined:
    1. in tgtg module
    2. in this module, as a default one - see this in the code
    3. in this module, as a user configured string
  • Complication: this user_agent will change over time, as TGTG update their app and depreciate older ones
  • Improvement needed: how to make this sustainable? tell users how to look for it and update themselves the config?

If anybody has ideas, I'm listening :)

@Chouffy Chouffy added the enhancement New feature or request label Jun 17, 2022
@liudger
Copy link

liudger commented Jun 17, 2022

Use a file on GitHub to acces the user agent data. This file could be updated by the community. So every time tgtg starts it retrieves that data?

@Chouffy
Copy link
Owner Author

Chouffy commented Jun 17, 2022

Hey @liudger thanks for your idea! I like it a lot.
Would you know by any chance python projects that works like this?
So we don't reinvent the wheel 😁

@liudger
Copy link

liudger commented Jun 17, 2022

MaxWinterstein/toogoodtogo-ha-mqtt-bridge#49

I just found out that the other tgtg addon is generating a random client? Maybe have look at that code.

@liudger
Copy link

liudger commented Jun 17, 2022

It uses google play scraper to get the recent info from play store. Really nice solution!

@ahivert
Copy link
Contributor

ahivert commented Jun 20, 2022

Was thinking about it, I will do it in the tgtg package.
If it's not done in a week don't hesitate to open an issue on tgtg repo.

@Chouffy
Copy link
Owner Author

Chouffy commented Jun 20, 2022

Was thinking about it, I will do it in the tgtg package. If it's not done in a week don't hesitate to open an issue on tgtg repo.

Love it, I was 5 min away to open an issue on the tgtg repo. Thanks a bunch!
I'll keep this issue open to keep track of the implementation in this Home Assistant integration

@ahivert
Copy link
Contributor

ahivert commented Jun 21, 2022

0.13.0 has been published it will by default retrieve automatically the last apk version in playstore to be used in user agent

@Chouffy
Copy link
Owner Author

Chouffy commented Jun 21, 2022

Awesome, I'll update this later this week

@Chouffy
Copy link
Owner Author

Chouffy commented Jun 21, 2022

Live in 4.2.1

@Chouffy Chouffy closed this as completed Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants