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
Reinstate UK Channel 5 (My5) #973
Comments
My5 never worked. |
I coded the scraping of the videos. Unfortunately, license request is obfuscated completely. Likely, nobody will be able to fetch the useful datas to read the videos. |
I have managed to bulid the request to get the iv and data needed as input to the license. I am struggling to find the number in the location of the mpd The C5278980003 comes from the episodes file eg:- I am lost though as to how to feed this to inputstream.adaptive to get the actual video to play. I will keep tinkering but if anybody can help, taht would be great... I have attached my working code - this runs under Kodi 18.9 on python2 ...... I will keep tinkering away, any input would be helpful and great! |
20200304115757 should be the "CreatedAt" variable. |
I have managed to get the stream URL and License url - i just can't get the video to play :( in get_video_url 2023-01-07 12:05:33.178 T:4583 NOTICE: Creating InputStream I might be selecting the incorrect stream type, the streams available are listed in
|
Looks like it is AES rijindael 128 bit crypto method. You have to use python Crypto library to implement it instead of reimplementing it in CUTVM. Anyway, I will try to make INPUTSTREAM Adaptive happy with that. |
Thank-you. I could not work out how to get aes decrypt to work using the
standard libraries I can't get the iv and the key decoded to the correct
length.
…On Sat, 07 Jan 2023, 17:17 joaopa00, ***@***.***> wrote:
Looks like it is AES rijindael 128 bit crypto method. You have to use
python Crypto library to implement it instead of reimplementing it in
CUTVM. Anyway, I will try to make INPUTSTREAM Adaptive happy with that.
—
Reply to this email directly, view it on GitHub
<#973 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APEBPDCYUSMIFKZ72ZK7FKTWRGCHPANCNFSM6AAAAAARFZNBTY>
.
You are receiving this because you commented.Message ID:
<Catch-up-TV-and-More/plugin.video.catchuptvandmore/issues/973/1374512878@
github.com>
|
I think my license request is bad. I see in traces a 3885 byte binary array
is sent as a payload which I am missing = will try and find out how to add
this.
…On Sat, 07 Jan 2023, 17:17 joaopa00, ***@***.***> wrote:
Looks like it is AES rijindael 128 bit crypto method. You have to use
python Crypto library to implement it instead of reimplementing it in
CUTVM. Anyway, I will try to make INPUTSTREAM Adaptive happy with that.
—
Reply to this email directly, view it on GitHub
<#973 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APEBPDCYUSMIFKZ72ZK7FKTWRGCHPANCNFSM6AAAAAARFZNBTY>
.
You are receiving this because you commented.Message ID:
<Catch-up-TV-and-More/plugin.video.catchuptvandmore/issues/973/1374512878@
github.com>
|
I am still struggling to get the license and stream to play. @joaopa00 i see from Could you share how you did this? I am struggling to get the data (large binary data) taht is sent with the license request as seen in the browser. I have attached my latests working version for Kodi 18. I can get the stream url eg The license call URL eg but i can't get the stream to play :( I always get Thankyou for any help |
For the video the house across the street / season 1/ episode 2 |
Thankyou, let me work with that and see what i do. Much appreciated! |
I have tried to mimic what @joaopa00 dose some amazing things) but I am still getting 2023-01-18 16:00:36.193 T:5883 ERROR : Open - error probing input format, https://hwdash.channel5.com/cenc/C5278980003/C5278980003A/20200304115757/C5278980003A-tt.mpd To me it looks like the same call in the above file I have run out of ideas i think :( here is my latest work, it now runs on Kodi 19 now with python3 to allow use of the resolver_proxy.get_stream_with_quality |
This version works for me on Kodi 18. It dose not have all the bells and whistles for showing the programs etc but at least shows play. Has some issues with things that don't have episodes in a series but video plays I will try do the same for a Kodi 19 version , and i see Kodi 20 |
I have fixed up the script for Kodi 18, i think all works now, including all menu selections If anybody is still on Kodi 18 and would like to test, i would appreciate any feedback. I will make a working version for kodi 19 next week |
Cool. Here is a version taht runs for me on Kodi 20. I see on the latest dev build of catch up tv, it references my5 as the file So to use this file Put this file inside the plugin.video.catchuptvandmore-dev directory on android device. Modify the plugin.video.catchuptvandmore-dev resources/lib/skeletons/uk_replay.py file, for me its the file And change this stanzana "my5": { "route": "/resources/lib/channels/uk/my5:list_categories", "label": "My 5", "thumb": "channels/uk/my5.png", "fanart": "channels/uk/my5_fanart.jpg", "enabled": True, "order": 1, }, "my5": { "route": "/resources/lib/channels/uk/my5:list_categories", "label": "My 5", "thumb": "channels/uk/my5.png", "fanart": "channels/uk/my5_fanart.jpg", "enabled": True, "order": 1, },Hope this makes sense |
plugin.video.catchuptvandmore-dev.zip If the above is gibberish i have rezipped the To install this i had to remove the existing Catch TV and More and Catch TV and More Artwork addons and install this ZIP from a zip file |
Some disclaimers I am having issues with live streams, on my browser when i go to a live streams i have the cirle with a trinagle play button but when i click on it nothing happens so I can't see the urls called to try and emulate, might be my vpn service, i am out of the UK. will see if i can get thsi to work as well, but if anybody can share the urls called for each live station, it would help If anything is broken, and i can fix it, i will gladly do so, just shout. thankyou for testing |
Many thanks for your efforts.
Regarding Live channels, I think that some modifications to uk_live.py will be required.
I will install and report back after testing.
From: nictjir ***@***.***>
Sent: Saturday, January 28, 2023 11:27 AM
To: Catch-up-TV-and-More/plugin.video.catchuptvandmore ***@***.***>
Cc: berkhornet ***@***.***>; Author ***@***.***>
Subject: Re: [Catch-up-TV-and-More/plugin.video.catchuptvandmore] Reinstate UK Channel 5 (My5) (Issue #973)
Some disclaimers
Starting video playback is a bit slow, the script dose lots of processing - have not found a way to use prebuilt functions for the encryption/decryption as yet but will keep trying
I can't get the new fancy resolver_proxy.get_stream_with_quality way of calling the inputstream.adaptive in Kodi 19/20 to work, so i just used the basic inputstream.adaptive with its parameters
I am having issues with live streams, on my browser when i go to a live streams i have the cirle with a trinagle play button but when i click on it nothing happens so I can't see the urls called to try and emulate, might be my vpn service, i am out of the UK. will see if i can get thsi to work as well, but if anybody can share the urls called for each live station, it would help
If anything is broken, and i can fix it, i will gladly do so, just shout.
thankyou for testing
-
Reply to this email directly, view it on GitHub<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCatch-up-TV-and-More%2Fplugin.video.catchuptvandmore%2Fissues%2F973%23issuecomment-1407378507&data=05%7C01%7C%7C952c0927ec4d4d1a209808db01229561%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638105020266359934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BpZ7zypVnlDI3vF%2BKrTJqoQEpI8U8aXExmDzts3WyDY%3D&reserved=0>, or unsubscribe<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQFFLX5NCM5PVYUAOLPVU3LWUT7ARANCNFSM6AAAAAARFZNBTY&data=05%7C01%7C%7C952c0927ec4d4d1a209808db01229561%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638105020266359934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Y1j0Y4FXzfWk40%2B2jmA%2FfLoWhLBDzIC54R5FTvo%2BG3s%3D&reserved=0>.uk_live.py will be equired
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Below are my findings from the initial tests of the My5 functionality.
GENERAL
1. I found video playback start time to be acceptable, running on a Windows PC
2. Occasionally a stream would not play, but selecting the same stream again then played ok
ALL SECTIONS (except Popular and Recently Added) - Menu item for single episode
Selecting any entry which is for a single entry (and not inside a Season folder) gives a "Name Error". Example extract from log:
2023-01-28 15:02:40.471 T:22028 error <general>: [Catch-up-TV-&-More.support] name 'ONEOFF' is not defined
Traceback (most recent call last):
File "C:\Users\xxx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\support.py", line 306, in run_callback
redirect = parent_ins(route, arg_params, self.callback_params)
File "C:\Users\xxx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\resolver.py", line 67, in __call__
results = super(Resolver, self).__call__(route, args, kwargs)
File "C:\Users\xxx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\script.py", line 169, in __call__
return route.function(self, *args, **kwargs)
File "C:\Users\xxx\AppData\Roaming\Kodi\addons\plugin.video.catchuptvandmore\resources\lib\channels\uk\my5.py", line 894, in get_video_url
resp = urlquick.get(ONEOFF % fname, headers=GENERIC_HEADERS, params=view_api_params)
NameError: name 'ONEOFF' is not defined
"ALL SHOWS" SECTION
Selecting this section gives a "Key Error". Extract from log:
2023-01-28 14:47:51.119 T:23740 error <general>: [Catch-up-TV-&-More.support] 'ids'
Traceback (most recent call last):
File "C:\Users\xx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\support.py", line 306, in run_callback
redirect = parent_ins(route, arg_params, self.callback_params)
File "C:\Users\xx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\route.py", line 196, in __call__
session_data = self._process_results(results)
File "C:\Users\xx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\route.py", line 210, in _process_results
listitems = validate_listitems(results)
File "C:\Users\xx\AppData\Roaming\Kodi\addons\script.module.codequick\lib\codequick\route.py", line 39, in validate_listitems
raw_listitems = list(raw_listitems)
File "C:\Users\xx\AppData\Roaming\Kodi\addons\plugin.video.catchuptvandmore\resources\lib\channels\uk\my5.py", line 753, in list_subcategories
ids = root['filters']['ids']
KeyError: 'ids'
"SMITHSONIAN" SECTION
Gives a "Run time error - no entries found", but does return to the menu. There are shows in this section on the My5 website.
"BET" SECTION
Gives a "Run time error - no entries found", but does return to the menu. There are shows in this section on the My5 website.
Please let me know if you need any further information.
|
Thankyou very much for your testing and feedback and logs - your testing is definitely more exhaustive than mine! Here is the my5 file or the whole zip again to reinstall Again thankyou for the testing and log sharing |
No problem. I've retested and all the bugs I reported are fixed. I will now do a bit more detailed testing and report back |
In my further testing I just noticed a few minor issues:
Hope this helps |
Thankyou Point 1 i noticed as well, I have been trying to think of a way around thsi, but so far nothing works. i will keep pondering. Seems like an easy thing to achieve but i just can't get the logic to work .... For the limit, i have changed this to 25 in attached zip. For live channels tahnkyou for the list. Thankyou again for the feedback. |
Regarding the live URLs, they work for me, but I just realised that they only work when signed in with my account details |
I am definitely logged in, tried a few different vpns and with all i get the same result, I can't play the live tv stations. You have a normal free channel5 account or do you have a paid for one? Unless i have been blacklisted ...... |
I just checked, the live channels are working here at the moment. Can you access the catch up content via the web browser? |
Thankyou for checking Just the two files above need changing. I thought i needed to make a proxy to remove some MPD entries that were breaking inputstreamadapative so i tinkered with service.py in the root directory of the plugin but this is not needed resources\lib\channels\uk\my5.py - this has changed code to play the live channels, they needed slightl changes to the catchup stuff to work resources\lib\skeletons\uk_live.py - lists the channels and their artwork |
Hi. Looks like we could submit a PR to add My5 to the main release. Before we do, I've added some code to my5.py to display the My5 artwork when browsing categories etc. Would you like to add it to your code? I could send you an updated my5.py file if so. Also, I have some artwork for the live channels that I will add to the images addon |
Add your my5.py file to here and a zip of the artwork. Then i need to learn how to do a PR :) or you can submit one :) But i would like to see your additions and add them in to make things look prityer. Thankyou |
Here is the update to my5.py file. I have annotated the changes with a # MY5-001 comment above the change. I had to rename to my5.txt to upload here. I have already submitted a PR to the resource.images.catchuptvandmore addon for the My5 artwork referenced by these changes. I will upload the live channel artwork soon |
and here is the artwork. I have uploaded .png and *_fanart.jpg versions for each channel. I think the addon only uses the .png format for live channels but I'm not 100% sure. |
Perfect. Nice changes, let me work out what to do to get a PR in and do it. Thankyou |
As such, I will not merge the commit. I explain why. The aim is the stable release is accepted by the xbmc team in the official repo. They don't accept large duplicate code. And in this code, there are tons of duplicate. This duplicate code have to be removed by using the already existing libraries. The big part of the code is AES decrypting. So you will have to find how to use the cripto library. Sorry for the disturbance |
Thankyou for the explanation. I will continue to try and work out how to use the AES libraries for this - up till now I have not been able to work this out but will continue working on it. |
Thankyou @NeutralKaon. All help will be greatly appreciated, i am just not working it out. If you look in the my5.py/my5.txt program above there is a lot of computation that happens with a call to part2(iv,aesKey,data) "We" need to make this work with some call to a python crypto AES module, as opposed to my programs full computation This could be AES rijindael 128 I have an example bellow of the inputs and the decrypted output. AES Key IV Data When the data is decoded this string pops out 0{"id":"C5278980003","assets":[{"renditions":[{"renditionid":0,"format":"SD","bitrates":[160,360,480,800,1200,1500],"url":"https://hwdash.channel5.com/cenc/C5278980003/C5278980003A/20200304115757/C5278980003A-tt.mpd"}],"profile":"dash1","drm":"widevine","keyserver":"https://cassie.channel5.com/api/v2/licences/widevine/208/C5278980003?expiry=1676633142&tag=31386632333364623866323366373462366661663134373966393035643563616364333231626561","version":"A","subtitled":true,"subtitleurl":"https://akasubs.akamaized.net/webvtt/C5278980003/C5278980003A.vtt","thumbnailsurl":"https://akathumbnails.channel5.com/C5278980003A/thumbnails.vtt","audiodescribed":false,"duration":2707},{"renditions":[{"renditionid":0,"format":"SD","bitrates":[160,360,480,800,1200,1500],"url":"https://akadash0.akamaized.net/cenc/C5278980003/C5278980003A/20200304115757/C5278980003A-tt.mpd"}],"profile":"dash1","drm":"playready","keyserver":"https://playreadydrm.channel5.com/v2/rightsmanager.asmx?x=NjM3YjllMWQtODdlOS00M2U4LTk1MjYtODZkN2E3YzAzNDg4OzE2LzAyLzIwMjMgMTQ6MjU6NDI7TUgwUjhDNm5SdWJkL1hmekNJWlc5djVtZDUyUXRQNEdpZUw4SFpSU3hwUT07UFMz","version":"A","subtitled":true,"subtitleurl":"https://akasubs.akamaized.net/webvtt/C5278980003/C5278980003A.vtt","thumbnailsurl":"https://akathumbnails.channel5.com/C5278980003A/thumbnails.vtt","audiodescribed":false,"duration":2707},{"renditions":[{"renditionid":0,"format":"SD","bitrates":[160,360,480,800,1200,1500],"url":"https://hwhls.channel5.com/fps/C5278980003/C5278980003A/20200304115800/C5278980003A.m3u8"}],"profile":"fpshls1","drm":"fairplay","keyserver":"https://cassie.channel5.com/api/v2/licences/fairplay/220/C5278980003?expiry=1676633142&tag=61346461363766393931623665333464323138613362656261346164656164663064383863366465","version":"A","subtitled":true,"thumbnailsurl":"https://akathumbnails.channel5.com/C5278980003A/thumbnails.vtt","audiodescribed":false,"duration":2707}]} If you can work out how to get to the result from the inputs with some a few lines of python using the crypto/Crypto.Cipher libraries try: "WE" should be good to go ..... Thankyou! |
Thanx for your enthusiasm. If you have a uk IP address, you can run this attached python program taht will output the aes key, iv, data and the decoded form of the data. c5.txt |
Buy that man a Bells! So my part2 now looks like def part2(iv, aesKey, rdata):
|
Funny you mentioned that, I was about to get to ask you about more work to do :) There is another part of manual processing i do After the info is pulled from the js file and processed, some magic/logic needs to happen to get the auth string to retrieve the auth key used in the url taht pulls the iv and data that have elegantly decoded for us. I think it might be some form of HMAC. Its not as clear as previous thing, i have updated c5.py to remove a lot of crap now and indicate where your next logic adventure is, look from line 315 in new c5.txt attached if you have the time to solve this then we should be good to go ...... thankyou again! |
Thankyou again, no rush |
Can't you use ljust method for null padding? There is no easy way in python to xorify two strings. So I think the way you choosed is fine. def url_parse(queryStr): does not work? |
Thankyou VERY much all for your suggestions. Here is a full zip of CUTVM and just the my5.py (as my5.txt) plugin.video.catchuptvandmore-dev-ch5.zip And the my5.txt @berkhornet if you have the time, if you don't mind giving a test to see all still works as before. I have done some checking myself and all seems good. If anybody is still using Kodi18, here is a version of my5.txt with all the crypto libraries etc that works on Kodi18 |
I have updated the files above, as per your request. |
@nictjir I've installed the updated my5.py file and all has tested successfully. Many thanks to all who contributed to the development |
Thankyou @berkhornet |
i think @joaopa00 has added comments on the actual pull request |
Thakyou, busy working through them and learning what flake8 means and
needs ...
…On Sun, 19 Feb 2023, 13:10 berkhornet, ***@***.***> wrote:
i think @joaopa00 <https://github.com/joaopa00> has added comments on the
actual pull request
—
Reply to this email directly, view it on GitHub
<#973 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APEBPDHFFP44MXZMMG35563WYH5TTANCNFSM6AAAAAARFZNBTY>
.
You are receiving this because you were mentioned.Message ID:
<Catch-up-TV-and-More/plugin.video.catchuptvandmore/issues/973/1435959281@
github.com>
|
@berkhornet would you mind please retesting this update, i have tried to accomidate all the issues resulting in the pr not being accepted. Alas the insertion of the My5 logo from local store as a a picie instead of the CUTVM logo had to be axed :( Here is full zip again or just the my5 as a txt Thankyou again. |
@nictjir all looks good apart from when selecting Documentaries category I get an IndexError. Extract from log: 2023-02-20 12:48:47.504 T:29688 error : [Catch-up-TV-&-More.support] list index out of range |
Thankyou @berkhornet for quick response. If you can retest please plugin.video.catchuptvandmore-dev-ch5.zip Thankyou gain |
Thankyou kindly! |
At least, the replay part is merged now. |
And now it is live. So this issue is fixed. Thanks to everybody for your hard work. |
Would it be possible to reinstate the Live and Catch Up options for UK Channel 5 (My5)? Looking at the code it was previously available but is now disabled.
Many thanks.
I have a My5 account and would be happy to test if this were possible.
The text was updated successfully, but these errors were encountered: