add-ons / plugin.video.yelo

Kodi add-on to watch content from the Telenet Yelo TV service
Other
14 stars 4 forks source link

Telenet TV compatibility #35

Open shycoderX opened 3 years ago

shycoderX commented 3 years ago

I want to either create a seperate add-on for Telenet TV or try to merge them into one add-on. Can someone supply me a request trace either using Chrome Devtools or something like Fiddler. I don't need your credentials (I even prefer not knowing them) so you can remove that from the trace.

The reason I need the trace to begin with is to see what requests an authenticated client does to be able to start a stream. Without it it is hard to get it working because I would need to somehow figure out the requests it should do myself..

Luboli commented 3 years ago

Someone made a plugin for Ziggo Go TV, which is based on the same Horizon TV platform, it may be of use to you https://github.com/dut-iptv/dut-iptv.github.io/tree/master/leia/plugin.video.ziggo

Here's the request for VTM: https://gist.github.com/Luboli/ad9ba5853e1796e101b83e15f41bbbef

shycoderX commented 3 years ago

Someone made a plugin for Ziggo Go TV, which is based on the same Horizon TV platform, it may be of use to you https://github.com/dut-iptv/dut-iptv.github.io/tree/master/leia/plugin.video.ziggo

Here's the request for VTM:

Thank you I tried requesting a DASH manifest this way:

    def request_manifest(self):
        HEADER = {
            'User-Agent': self.USER_AGENT,
            'X-Client-Id': self.CLIENT_ID,
            'X-OESP-Token': self.token,
            'X-OESP-Username': self.username,
        }

        url = "https://wp1-halo01-vxtoken-live-be-prod.tnprod.cdn.dmdsdp.com/dash/vtmhd/manifest.mpd"

        r = self.session.get(url, headers=HEADER)
        print(r.content)

but that didn't work (probably because my telenet account doesn't allow it).

Could you provide a Fiddler trace using https://www.telerik.com/download/fiddler/fiddler4 just save the trace and send it to me if you want. You can remove the entry where the login information is posted to the server in that trace. It it important I can see which data gets transmitted and from where it comes. Now I only have the urls which is a bit abstract.

If I can write a simple Python script and the requests are correct, then I can send you the application to test and if all works OK I can integrate it in a Kodi Add on.

dagwieers commented 3 years ago

There is an opportunity here to collaborate on a common platform for both add-ons. We would like to do the same thing for tvvlaanderen, which supports about 15 different setups in Europa.

Luboli commented 3 years ago

I'll send you an email with the file, as it's almost impossible to remove the private information.

shycoderX commented 3 years ago

I'll send you an email with the file, as it's almost impossible to remove the private information.

@dagwieers @Luboli

Dankzij @Luboli is het gelukt om een Kodi Addon op te bouwen, helaas zit ik nog met één probleem en dat is waar ik ook een tijdje vastzat bij de Yelo add on.. en dat is terug de licentie onderhandelen met de server. Ik krijg nu telkens

[{"type":"state","code":"concurrency","reason":"invalid"}]

Ik heb https://obo-prod.oesp.telenettv.be/oesp/v4/BE/nld/web/license/eme gebruikt als license url, omdat ik veronderstel uit de trace van @Luboli dat dit de correcte is.

Ik zie wel dat de request die inputstream doet niet echt overeen komt met wat ik zie in @Luboli zijn trace.. Spijtig genoeg is die data binair (en mogelijks encrypted) dus weet ik niet direct wat er mankeert.

Heeft hier iemand meer verstand van? :)

michaelarnauts commented 3 years ago

Die concurrency doet me eerder denken dat er misschien al een stream speelt (bij @luboli?), en dat je maar een maximum aantal streams kan bekijken? Of misschien zit er een beveiliging op waarbij je enkel vanaf een Telenet-verbinding kan kijken?

Die data van de license is altijd binair, da's iets dat de widevine Library zelf ophaalt, en waar de Addon dus zelf niets mee moet doen.

Luboli commented 3 years ago

Er speelde inderdaad een stream af, kan je zien in de trace. Bij TelenetTV is het zo dat elk toestal apart geregisteerd moet worden, ik weet niet of dat ook bij YeloTV moest en dat daar misschien het probleem zit.

shycoderX commented 3 years ago

Die concurrency doet me eerder denken dat er misschien al een stream speelt (bij @Luboli?), en dat je maar een maximum aantal streams kan bekijken? Of misschien zit er een beveiliging op waarbij je enkel vanaf een Telenet-verbinding kan kijken?

Die data van de license is altijd binair, da's iets dat de widevine Library zelf ophaalt, en waar de Addon dus zelf niets mee moet doen.

Ja maar als ik kijk in de trace van @Luboli en dat vergelijk met wat er wordt verstuurd naar de license server vanuit de add on is dat totaal verschillend.

Luboli commented 3 years ago

Ik zal eens een trace doen met de android app, zien of dat verschillend is

shycoderX commented 3 years ago

Ik zal eens een trace doen met de android app, zien of dat verschillend is

Zou goed kunnen dat het device inderdaad moet geregistreerd worden vooraleer ik een stream kan startten. Maar dan moet ik ook eerst weer het API endpoint kunnen achterhalen (en de nodige data naar dat endpoint) want deze zijn allemaal verschillend van Yelo Play.

Luboli commented 3 years ago

Sinds android 7 is het onmogelijk om https trafiek te decrypteren met een proxy, dus het zal niet lukken Zou het niet beter zijn dat ik een extra account aanmaak voor je, zodat je zelf kan kijken? Ik kan nog 2 extra toestellen registreren (max 5 per abonnement)

shycoderX commented 3 years ago

Sinds android 7 is het onmogelijk om https trafiek te decrypteren met een proxy, dus het zal niet lukken Zou het niet beter zijn dat ik een extra account aanmaak voor je, zodat je zelf kan kijken? Ik kan nog 2 extra toestellen registreren (max 5 per abonnement)

Ok, lijkt mij het proberen waard.

shycoderX commented 3 years ago

Even ter info:

Bij de HTTP POST naar https://obo-prod.oesp.telenettv.be/oesp/v4/BE/nld/web/license/token geef je een deviceId mee. Ik had deze overgenomen van de trace, maar als je deze wijzigt krijg je volgende als response, kan dus inderdaad zijn dat die concurrency fout dan komt dat hij misschien door heeft dat er vanuit twee verschillende IP adressen gebruik wordt gemaakt van dezelfde device id ofzo.

[{"type":"state","code":"deviceUnregistered","reason":"prohibited","providerTitle":"VIJF HD"}]

Luboli commented 3 years ago

Sinds android 7 is het onmogelijk om https trafiek te decrypteren met een proxy, dus het zal niet lukken Zou het niet beter zijn dat ik een extra account aanmaak voor je, zodat je zelf kan kijken? Ik kan nog 2 extra toestellen registreren (max 5 per abonnement)

Ok, lijkt mij het proberen waard.

Email is verzonden met login informatie

shycoderX commented 3 years ago

@Luboli @dagwieers @michaelarnauts

Heb zelf eens Fiddler opengezet en een stream gestart via de Telenet TV web interface. Daarna heb ik via Fiddler het request body van de https://obo-prod.oesp.telenettv.be/oesp/v4/BE/nld/web/license/eme call opgeslaan als binary.

De headers en de binary heb ik even a.d.h.v. Postman opnieuw gepost maar het vreemde is, dat deze data mij identiek lijken maar nu krijg ik onderstaande fout, terwijl de X-OESP-Content-Locator header dezelfde is als in de trace.

[
    {
        "type": "state",
        "code": "contentLocator",
        "reason": "invalid"
    }
]
piejanssens commented 3 years ago

I currently have an issue logging on, but this looks promising. If it works we should maybe adopt/contribute instead of creating yet another add-on. https://github.com/dut-iptv/dut-iptv.github.io/tree/master/matrix/plugin.video.betelenet

shycoderX commented 3 years ago

I currently have an issue logging on, but this looks promising. If it works we should maybe adopt/contribute instead of creating yet another add-on. https://github.com/dut-iptv/dut-iptv.github.io/tree/master/matrix/plugin.video.betelenet

Is this for Telenet TV only? I was busy partly rewriting my current application (when I have the time) but if this is for Yelo Play too then I don’t see the point if that application offer more functionality?

piejanssens commented 3 years ago

Yes, it seems so, but it's untested and I cannot confirm until I can actually login. Author will provide a new build with more verbose logging to figure out the issue.

Telenet TV is completely untested because I don't have access to a subscription. Looking at the API it does seem it should be exactly the same as the Ziggo API.

https://github.com/dut-iptv/dut-iptv/issues/65