plugin.video.vtm.go icon indicating copy to clipboard operation
plugin.video.vtm.go copied to clipboard

Remove the User-Agent and other headers

Open michaelarnauts opened this issue 1 year ago • 4 comments

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

michaelarnauts avatar Jul 16 '24 12:07 michaelarnauts

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.

gustav-janssens avatar Jul 31 '24 18:07 gustav-janssens

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

trick72 avatar Aug 09 '24 11:08 trick72

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

gustav-janssens avatar Aug 09 '24 18:08 gustav-janssens

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

skycamel avatar Aug 17 '24 15:08 skycamel