xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
453 stars 242 forks source link

How to add Cookie in the #KODIPROP header #415

Closed vaselinetv closed 3 years ago

vaselinetv commented 4 years ago

I have an url which should be accessed with Cookie, please help me to access url using #KODIPROPS

URL

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/playlist.m3u8?DVR

COOKIE:

CloudFront-Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4NjM4NTQ0MX19fV19; CloudFront-Key-Pair-Id=APKAIWHAQM7JDJRYIKDA; CloudFront-Signature=F4-64GHtkQMvCNPsoCqgPNq7QjY5csQe7lziIWRmfsyFARoriakEoxDNLbPuJWzytaGfO6uJL1ywRsHQsdBI8gQGtzO6ObCtxdmSlY7CucLuWl7jCtZatOOXLxWpmKDREnpx70XJq7DTM4y2dcqpoaPXqlnIPYUyu0h2LbPFbC2zJ3sxedcGSAdihnTe4O~8sqg~iPQnJurlr4vC0QTABq7LXgOzUPlPXDCiNr9vaGhhLZWwAC1M9uNWjqW-Zpfvp6TF~xvNcZsdbSARB3-k--fBTxXDLuvKWZDP7enzOD0elhmz8GCTV7rIc7BcUqIWthg4wto8T7UY5DccWF8Myg__

vaselinetv commented 4 years ago

I tried the following in my m3u but no luck

KODIPROP:inputstreamaddon=inputstream.adaptive

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4NTc1NjA0MX19fV19; CloudFront-Key-Pair-Id=APKAIWHAQM7JDJRYIKDA; CloudFront-Signature=Ym2~ssOtrl7Lu2ypbEP8Zyqu9eOL2Ff59vZVLUoSPhKWO2X49RWwJfAt9GRxzp58nqdiKnbmhpcq99K9LUdtxfl-tPoyxCuDZaphJkvyXh~LctrAr2ly~G6OhjQf0sRAvu9zct9eRC9~6Y4-cZRH2jttSfRshrvi5so4Sqsd6KUCxXfnVgxUBHyB2ru10u3jKCMjRjlxX19WuniSfFdc4J2z8zgsDKQYf2euOP7ESLWrd9dYzzFPhpv0gZeideFC98jWxig8QzW5dJTxqu6sHcZugRElzDhyVAdlgPDrFdmJKr0haXumEIYY5xqW-cEpO9UXTSDMfI9duZlmIgt6uw__

EXTINF:-1 group-title="Test",TV9

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/playlist.m3u8?DVR

basilgello commented 4 years ago

cookie value should be url-encoded to work.

vaselinetv commented 4 years ago

I tried after urlencode but no luck. I have mentioned few examples as below. Please help.

=====================================

KODIPROP:inputstreamaddon=inputstream.adaptive

KODIPROP:inputstream.adaptive.stream_headers=cookie%3DCloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4Njg3OTc3Mn19fV19%3B%20CloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA%3B%20CloudFront-Signature%3Da5TFQAdu7D1DZkwYQp-eXT1tZVuWbyju3z8se1G1ldaR-cVQzUOczKnvCpRUPiWoPBHqfkB9ls6capAX129H4-~OG~r7VppL5MkBp~Mp76p4JQvKcweW~C5keEsS5q29~-B3-rGIjh~nx0LoJawqa5ry3X~y1Ww3d8JjFkFVFO4LAsBxyv9hfIHnPs9aPUEIkmwcMc-X~FdJvJaOvnKXX0~k9EQjc6qBkcwmeSFx4lCeaARdygeMZmDCubBsaTwQY5WNoLu04V9skxsB91hJ4IUO6odDSP3ipWaQLX7FZY2ktlIiGR~iDsXSbO5gp7fHQyjYvDxuZai7dynzrnNSRw__%3B

EXTINF:-1 group-title="Test",TV9 2

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/chunklist_b896000_DVR_sleng.m3u8

================================================

KODIPROP:inputstreamaddon=inputstream.adaptive

KODIPROP:inputstream.adaptive.manifest_type=hls

KODIPROP:inputstream.adaptive.mime_type=application/vnd.apple.mpegurl

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4Njg4MTU4OX19fV19

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Signature%3DXhEugT9aaiauIIKnTsCFuHlr5C1wZMPtXBwzw97lNqw15g43m4QB~NWaR~~4J1uqNmCz5yk8MvGTzMKNmhNF5N56U1sAj~XudQR0v5-E~Wzgunq45qvyoNi47jzgUs-c5zLpW061cBouuO7TaQ8rTJ3ll6lHGOsMcl7r4N7di8w~rHOhC10897NSmmkJn-K~q2vPTUeOtJA20YZigXRthyOCChMb-3mNMvT5Zorjg6LJLrHNuw~MlOeSqjkhiLfdx9T7oIvBfamkgnNdP~XBoV~T4lTcAiqNotx0RfpZZLc3kWWIpBQQ6W5~vmfUAeK-MWAC2MrExBSjB~pJvjElvg__

EXTINF:-1 group-title="Test",TV9 5

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/chunklist_b896000_DVR_sleng.m3u8

=======================================================

KODIPROP:inputstreamaddon=inputstream.adaptive

KODIPROP:inputstream.adaptive.manifest_type=hls

KODIPROP:inputstream.adaptive.mime_type=application/vnd.apple.mpegurl

KODIPROP:inputstream.adaptive.stream_headers=Cookie%3DCloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4Njg4MTU4OX19fV19

KODIPROP:inputstream.adaptive.stream_headers=Cookie%3DCloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA

KODIPROP:inputstream.adaptive.stream_headers=Cookie%3DCloudFront-Signature%3DXhEugT9aaiauIIKnTsCFuHlr5C1wZMPtXBwzw97lNqw15g43m4QB~NWaR~~4J1uqNmCz5yk8MvGTzMKNmhNF5N56U1sAj~XudQR0v5-E~Wzgunq45qvyoNi47jzgUs-c5zLpW061cBouuO7TaQ8rTJ3ll6lHGOsMcl7r4N7di8w~rHOhC10897NSmmkJn-K~q2vPTUeOtJA20YZigXRthyOCChMb-3mNMvT5Zorjg6LJLrHNuw~MlOeSqjkhiLfdx9T7oIvBfamkgnNdP~XBoV~T4lTcAiqNotx0RfpZZLc3kWWIpBQQ6W5~vmfUAeK-MWAC2MrExBSjB~pJvjElvg__

EXTINF:-1 group-title="Test",TV9 4

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/chunklist_b896000_DVR_sleng.m3u8

======================================================

KODIPROP:inputstreamaddon=inputstream.adaptive

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4Njg3OTc3Mn19fV19%3B%20CloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA%3B%20CloudFront-Signature%3Da5TFQAdu7D1DZkwYQp-eXT1tZVuWbyju3z8se1G1ldaR-cVQzUOczKnvCpRUPiWoPBHqfkB9ls6capAX129H4-~OG~r7VppL5MkBp~Mp76p4JQvKcweW~C5keEsS5q29~-B3-rGIjh~nx0LoJawqa5ry3X~y1Ww3d8JjFkFVFO4LAsBxyv9hfIHnPs9aPUEIkmwcMc-X~FdJvJaOvnKXX0~k9EQjc6qBkcwmeSFx4lCeaARdygeMZmDCubBsaTwQY5WNoLu04V9skxsB91hJ4IUO6odDSP3ipWaQLX7FZY2ktlIiGR~iDsXSbO5gp7fHQyjYvDxuZai7dynzrnNSRw__%3B

EXTINF:-1 group-title="Test",TV9

https://liveb.airtelxstream.in/tv9telugunews/smil:common.smil/chunklist_b896000_DVR_sleng.m3u8

======================================================

basilgello commented 4 years ago

I faced the same issue today. Basically you need to do the following:

#KODIPROP:inputstream.adaptive.stream_headers=Cookie=<url-encoded-value-of-cookie>

I see you did that for TV9 4 but TV9 2 is wrong. See my PR

And try this:

#KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi90djl0ZWx1Z3VuZXdzL3NtaWw6Y29tbW9uLnNtaWwvKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU4NjM4NTQ0MX19fV19%3B%20CloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA%3B%20CloudFront-Signature%3DF4-64GHtkQMvCNPsoCqgPNq7QjY5csQe7lziIWRmfsyFARoriakEoxDNLbPuJWzytaGfO6uJL1ywRsHQsdBI8gQGtzO6ObCtxdmSlY7CucLuWl7jCtZatOOXLxWpmKDREnpx70XJq7DTM4y2dcqpoaPXqlnIPYUyu0h2LbPFbC2zJ3sxedcGSAdihnTe4O8sqgiPQnJurlr4vC0QTABq7LXgOzUPlPXDCiNr9vaGhhLZWwAC1M9uNWjqW-Zpfvp6TF~xvNcZsdbSARB3-k--fBTxXDLuvKWZDP7enzOD0elhmz8GCTV7rIc7BcUqIWthg4wto8T7UY5DccWF8Myg__

bhanuagarwal73 commented 2 years ago

@vaselinetv I am also facing same issue. Can you please tell me how you solved this?

basilgello commented 2 years ago

@bhanuagarwal73 Can you please expose the cookie your server expects? Maybe redact a few symbols to make it immediately wrong if you pay for that service. 5-6 letters redacted is enough.

bhanuagarwal73 commented 2 years ago

@basilgello This is what I am doing

EXTINF:-1 tvg-id="STAR.Plus.HD.in" tvg-name="Star Plus HD" tvg-logo="https://www.indiantelevision.com/sites/default/files/images/tv-images/2020/09/16/star.jpg" group-title="Entertainment",Star Plus HD

KODIPROP:inputstream.adaptive.stream_headers=Cookie=CloudFront-Policy%3DeyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vbGl2ZWIuYWlydGVseHN0cmVhbS5pbi96ZWVhbm1vbC9zbWlsOmNvbW1vbi5zbWlsLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2NjExODk4Nzh9fX1dfQ%3BCloudFront-Key-Pair-Id%3DAPKAIWHAQM7JDJRYIKDA%3BCloudFront-Signature%3DfLTh~Sd4cIYDewco7kFMJTcM6ZZ2izY5lQ2kOiw8LpJ3AzCrVuE1CMkbgMXa--QpFqSZcbmRwCkqJQcHh9en4p7DXsQYuTAKhmna8kn15RoSKjWOjhtwfqMxaym5itOZnJB8jeADpmZ6eJia7gf3SjxreuyDkzSdCQ-htF~l~2UBvXhdPjzdtYlbS5BlsrplL--jqi9gNAnqhRMBYsV5FBnU7P89ruJJ6C4EAKMhjPyjwxbW77-Ma2NOcMaCDW8McME7rIR4bX7J0npOCd1ywBOGXb6y3grXySowtnooFb-ErM3Z4QmByiff-uIEE-cNxOFhn3G40KX1wVuIhw~MHg&Host=liveb.airtelxstream.in

https://liveb.airtelxstream.in/zeeanmol/smil:common.smil/chunklist_b896000_DVR_sleng.m3u8

bhanuagarwal73 commented 2 years ago

Any resolution?

seyf87shop commented 2 months ago

Any resolution? please