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

Remove the User-Agent and other headers #389

Open
michaelarnauts opened this issue Jul 16, 2024 · 4 comments
Open

Remove the User-Agent and other headers #389

michaelarnauts opened this issue Jul 16, 2024 · 4 comments

Comments

@michaelarnauts
Copy link
Collaborator

I got a request from DPG to remove some HTTP headers:

De VTM GO en Streamz Kodi plugins doen zich in de communicatie met onze servers voor als een Android app. Dit bemoeilijkt onze werking.

Daarom willen we vragen om toch een aantal aanpassingen door te voeren, zodat dit onze werking alvst niet verder bemoeilijkt.

https://github.com/add-ons/plugin.video.vtm.go/blob/master/resources/lib/vtmgo/util.py#L20
https://github.com/add-ons/plugin.video.streamz/blob/master/resources/lib/streamz/util.py#L35

Gelieve volgende wijzigingen door te voeren:

  • Een geldige User-Agent header meesturen die de app identificeert als Kodi
  • Deze headers verwijderen: x-persgroep-mobile-app, x-persgroep-os, x-persgroep-os-version
@gustav-janssens
Copy link

Thanks for the update, that is unfortunate. Glad that they're not taking other (more drastic) actions. I think I've made the changes requested by updating util.py: removing the three requested parameters from the header and replacing the User-Agent by a random Kodi one, resulting in the following headers:

SESSION.headers = {
    'User-Agent': 'Kodi/18.5 (X11; Linux armv71) Linux/2019.11-1 HW_RaspberryPi/1.0 App_Bitness/32 Version/17.240626',
    'x-app-version': '17',
}

I hope that complies with their request.

@trick72
Copy link

trick72 commented Aug 9, 2024

Thanks for the update, that is unfortunate. Glad that they're not taking other (more drastic) actions. I think I've made the changes requested by updating util.py: removing the three requested parameters from the header and replacing the User-Agent by a random Kodi one, resulting in the following headers:

SESSION.headers = {
    'User-Agent': 'Kodi/18.5 (X11; Linux armv71) Linux/2019.11-1 HW_RaspberryPi/1.0 App_Bitness/32 Version/17.240626',
    'x-app-version': '17',
}

I hope that complies with their request.

Hi Gustav,
Do we need to do this manually (as an end user)? I looked at the util.py here on github but it is still the old request I think... Do we need to change this on our kodi box itself?
Thanks

@gustav-janssens
Copy link

Hi @trick72 ,

To my knowledge, yes. There is still work going on, see the draft PRs, so for the moment I've made that change directly on the kodi box itself (turning off updates for the addon), in addons/plugin.video.vtm.go/resources/lib/vtmgo/util.py

@skycamel
Copy link

I've tried the change as specified here unfortunately the vtmgo plugin is still not working, I Get "VTM go error" whenever I try to play something and all lists stay empty.
Can anyone please confirm if this change is working (or not)?
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants