Hi, I'm quite new to video decrypting but I'm learning how to do it thanks to the great tutorials on this forum.
I'm trying to download episodes of this series on RaiPlay (Italian national broadcasting company):
https://www.raiplay.it/programmi/delittiinparadiso
Episodes from 1 to 4 are DRM encrypted with Widevine, but I've successfully managed to find key with WKS-KEYS (a month ago episodes 1 and 2 were not encrypted at all).
Problems are with episodes 5 and 6, because they use a different protection.
If I inspect MPD files, they seems to contain both Widevine and PlayReady PSSH, although there is only one stream at 1280x720 pixels (I've read that Widevine is used for low resolution streams and PlayReady for high resolution ones when in the same source page).
WKS-KEYS gives me an error message (protobufs).
Someone can help me and explain how get keys? What should I put in headers.py? ...
There will be more episodes in future, so I would learn how to decrypt them on my own.
Thanks in advance (and sorry for my English).
Episode 5 - La casa dei miracoli
page:
MPD:
PSSH Widevine:
PSSH PlayReady:Code:AAAAcnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFIIARIQQwEDo86RNsC5mlJ+Ap3irxoFTmFncmEiNWRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDU1MjkxMF8sMTgwMCwyNDAw
License (?):Code:AAAErnBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAABI6OBAAAAQABAIQEPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAHkAUgBlAGEAZAB5AEgAZQBhAGQAZQByACIAIAB2AGUAcgBzAGkAbwBuAD0AIgA0AC4AMAAuADAALgAwACIAPgA8AEQAQQBUAEEAPgA8AFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBFAFkATABFAE4APgAxADYAPAAvAEsARQBZAEwARQBOAD4APABBAEwARwBJAEQAPgBBAEUAUwBDAFQAUgA8AC8AQQBMAEcASQBEAD4APAAvAFAAUgBPAFQARQ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UAQQBEAEUAUgA+AA==
CURL (?):
Episode 6 - Un omicidio annunciatoCode:curl 'https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0' -H 'Accept: */*' -H 'Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'nv-authorizations: eyJhbGciOiJIUzI1NiIsImtpZCI6IjE5MDEwIiwidHlwIjoiSldUIn0.eyJ2ZXIiOiIxLjAiLCJ0eXAiOiJDb250ZW50QXV0aFoiLCJleHAiOjE2OTA2MjM0MzQsImNvbnRlbnRSaWdodHMiOlt7ImNvbnRlbnRJZCI6ImRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDU1MjkxMF8sMTgwMCwyNDAwIiwic3RhcnQiOiIyMDIzLTA3LTI5VDExOjM2OjE0LjY2N1oiLCJlbmQiOiIyMDIzLTA3LTMwVDA0OjE2OjEzLjY2N1oiLCJzdG9yYWJsZSI6dHJ1ZSwidXNhZ2VSdWxlc1Byb2ZpbGVJZCI6IldpZGV2aW5lIFBlcnNpc3RlbnQgU0wzIEhEQ1BfTk9ORSAoU09OWSkifV19.fCYLBO2UbzeFaehtzLKVFOQ3gTk4dyY8YD0o3WBTkHQ' -H 'Origin: https://www.raiplay.it' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' --data-raw $'\x08\x04'
page:
MPD:
PSSH Widevine:
PSSH PlayReady:Code:AAAAcnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFIIARIQHwjwqm6sOdWj9i1p2udidBoFTmFncmEiNWRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDYwNTUxMV8sMTgwMCwyNDA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BpADEAcAAyAHUAZABpAGQAQQA9AD0APAAvAEsASQBEAD4APABDAFUAUwBUAE8ATQBBAFQAVABSAEkAQgBVAFQARQBTACAAeABtAGwAbgBzAD0AIgAiAD4APABDAG8AbgB0AGUAbgB0AFIAZQBmAD4AZAByAG0AXwByAG8AbwB0AC8ARABSAE0ATgBhAGcAcgBhAF8AUwBvAG4AeQBfAG0AdQBsAHQAaQBhAHUAZABpAG8ALwAyADAANgAwADUANQAxADEAXwAsADEAOAAwADAALAAyADQAMAAwADwALwBDAG8AbgB0AGUAbgB0AFIAZQBmAD4APAAvAEMAVQBTAFQATwBNAEEAVABUAFIASQBCAFUAVABFAFMAPgA8AEMASABFAEMASwBTAFUATQA+AHoAegBZAFgAZQBtAG8AdwBLAEcAQQA9ADwALwBDAEgARQBDAEsAUwBVAE0APgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
CURL (?):
Code:curl 'https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0' -H 'Accept: */*' -H 'Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'nv-authorizations: eyJhbGciOiJIUzI1NiIsImtpZCI6IjE5MDEwIiwidHlwIjoiSldUIn0.eyJ2ZXIiOiIxLjAiLCJ0eXAiOiJDb250ZW50QXV0aFoiLCJleHAiOjE2OTA2MjQ0MjYsImNvbnRlbnRSaWdodHMiOlt7ImNvbnRlbnRJZCI6ImRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDYwNTUxMV8sMTgwMCwyNDAwIiwic3RhcnQiOiIyMDIzLTA3LTI5VDExOjUyOjQ2LjkwOFoiLCJlbmQiOiIyMDIzLTA3LTMwVDA0OjMyOjQ1LjkwOFoiLCJzdG9yYWJsZSI6dHJ1ZSwidXNhZ2VSdWxlc1Byb2ZpbGVJZCI6IldpZGV2aW5lIFBlcnNpc3RlbnQgU0wzIEhEQ1BfTk9ORSAoU09OWSkifV19.eIRRi922hUTvid_oRBcphMSVb_xgXR2bqvsSEHQHuFU' -H 'Origin: https://www.raiplay.it' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' --data-raw $'\x08\x04'
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 30 of 83
-
-
mpd Delitti-in-Paradiso-S12E5
Code:https://streamcdng5-b70cb04c54ab478189e9d8ee45637b13.msvdn.net/ostr1/podcastcdn/drm_root/DRMNagra_Sony_multiaudio/20552910_,1800,2400/manifest_mvnumber.mpd?hdnea=st=1690650166~exp=1690650316~acl=/*~hmac=99bbee7fc60369bcd8cc9674513feb19cf2687b4863dff700702c8ba92cecd1f
Code:--key 430103a3ce9136c0b99a527e029de2af:c182a5c77df577dc03bcc2af94c0e1e6
Code:https://streamcdng21-b70cb04c54ab478189e9d8ee45637b13.msvdn.net/ostr2/podcastcdn/drm_root/DRMNagra_Sony_multiaudio/20605511_,1800,2400/manifest_mvnumber.mpd?hdnea=st=1690650292~exp=1690650442~acl=/*~hmac=f68188373ff0f4ec8fe94cad0178c2f93c5a5901f1f8aa7253d3f6b40157396b
Code:--key 1f08f0aa6eac39d5a3f62d69dae76274:fe838f5690a7bb652b5e400172b32dc5
-
For this , I think the "nv-authorizations" maybe of one time use , so try the following:
- Open devtools , and go to network tab and search for lic
- Play the episode
- Right click on the lic url and choose "Block Request URL" then refresh the page .
- Now the lic url "appears in red" , right click then copy as CURL (Bash) and past in https://curlconverter.com/ then copy to headers.py and it should look like this:
Code:headers = { 'sec-ch-ua': '"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"', 'Referer': 'https://www.raiplay.it/', 'nv-authorizations': 'eyJhbGciOiJIUzI1NiI.....etc', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', } data = '\b\x04'
Code:La casa dei miracoli: 430103a3ce9136c0b99a527e029de2af:c182a5c77df577dc03bcc2af94c0e1e6 Un omicidio annunciato: 1f08f0aa6eac39d5a3f62d69dae76274:fe838f5690a7bb652b5e400172b32dc5
-
Thank you thej911.
I've tried as you suggested.
I've opened dev tools in Firefox. inserted "lic" as filter and started video. 3 entry appear with same address.
1° is OPTION, 2° is POST, 3° is same as 2° with drmdeviceid in request headers.
I've blocked address:
Code:https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses
[Attachment 72765 - Click to enlarge]
I've refreshed, selected red url,
[Attachment 72766 - Click to enlarge]
copied as cURL (POSIX), pasted in curlconverter and result is:
Code:import requests headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0', 'Accept': '*/*', 'Accept-Language': 'it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3', # 'Accept-Encoding': 'gzip, deflate, br', 'nv-authorizations': 'eyJhbGciOiJIUzI1NiIsImtpZCI6IjE5MDEwIiwidHlwIjoiSldUIn0.eyJ2ZXIiOiIxLjAiLCJ0eXAiOiJDb250ZW50QXV0aFoiLCJleHAiOjE2OTA3MjEzMTEsImNvbnRlbnRSaWdodHMiOlt7ImNvbnRlbnRJZCI6ImRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDU1MjkxMF8sMTgwMCwyNDAwIiwic3RhcnQiOiIyMDIzLTA3LTMwVDE0OjQ3OjMyLjM0NVoiLCJlbmQiOiIyMDIzLTA3LTMxVDA3OjI3OjMxLjM0NVoiLCJzdG9yYWJsZSI6dHJ1ZSwidXNhZ2VSdWxlc1Byb2ZpbGVJZCI6IldpZGV2aW5lIFBlcnNpc3RlbnQgU0wzIEhEQ1BfTk9ORSAoU09OWSkifV19.MQGEU-iw5a2rG-K-ZfEM95CZoe9WyZWT5RubraNxbdU', # 'Content-Length': '2', 'Origin': 'https://www.raiplay.it', 'DNT': '1', 'Connection': 'keep-alive', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'cross-site', } response = requests.post('https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses', headers=headers)
Code:PSSH: AAAAcnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFIIARIQQwEDo86RNsC5mlJ+Ap3irxoFTmFncmEiNWRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDU1MjkxMF8sMTgwMCwyNDAw License URL: https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses unable to parse license - check protobufs
Code:import requests headers = { 'sec-ch-ua': '"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"', 'Referer': 'https://www.raiplay.it/', 'nv-authorizations': 'eyJhbGciOiJIUzI1NiIsImtpZCI6IjE5MDEwIiwidHlwIjoiSldUIn0.eyJ2ZXIiOiIxLjAiLCJ0eXAiOiJDb250ZW50QXV0aFoiLCJleHAiOjE2OTA3MjI3MjMsImNvbnRlbnRSaWdodHMiOlt7ImNvbnRlbnRJZCI6ImRybV9yb290L0RSTU5hZ3JhX1NvbnlfbXVsdGlhdWRpby8yMDU1MjkxMF8sMTgwMCwyNDAwIiwic3RhcnQiOiIyMDIzLTA3LTMwVDE1OjExOjAzLjg5MVoiLCJlbmQiOiIyMDIzLTA3LTMxVDA3OjUxOjAyLjg5MVoiLCJzdG9yYWJsZSI6dHJ1ZSwidXNhZ2VSdWxlc1Byb2ZpbGVJZCI6IldpZGV2aW5lIFBlcnNpc3RlbnQgU0wzIEhEQ1BfTk9ORSAoU09OWSkifV19.lkXoXAZ_fUVWKk4TSndsnaN7hOJb6NTF4KJPj0WPmVg', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'Content-Type': 'application/x-www-form-urlencoded', } data = '\b\x04' response = requests.post( 'https://rai6nb5f.anycast.nagra.com/RAI6NB5F/wvls/contentlicenseservice/v1/licenses', headers=headers, data=data, )
P.S.: I can't answer quickly because I don't have much free time due to work. -
Tested it on firefox , and the same happened to me , so to fix this refresh the page again (while still blocking the url ), now you will find two entries with the name license ,copy as cURL (POSIX) the one with post method , paste in curlconverter and copy back to headers.py and you should be fine mate .
Regards -
hum!
url:Code:https://www.raiplay.it/video/2023/07/Delitti-in-Paradiso-S12E3-Un-tuffo-nel-passato-85d66bb8-11ec-40e2-bdbe-797bc4747151.html
Code:AAAAMnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABISEH6xlGx500qgrx7IdyyzYqs=
Code:https://dashazv3-dc-euno.akamaized.net/subtl_proxy/6ba90611-9e01-4194-a85a-6944aa6b2688/INTEGRALE-20230705230217_20443150.ism/manifest(format=mpd-time-csf).mpd?hdnea=st=1690888273~exp=1690888423~acl=/*~hmac=11dff8c26bcd307633cfde87c74813a548c1d382b03b786b2bde01721091826a
Code:https://amsv3northeurope.keydelivery.northeurope.media.azure.net/Widevine/
Code:--key 7eb1946c79d34aa0af1ec8772cb362ab:cbfa45f6532eb8ab3a3a9ef5bf01b70e
-
Almost every DRM-stream is protected by both Widevine and Playready.
Widevine is for Android devices, Playready is for Windows devices.
Widevine and Android created by Google... Playready and Windows created by Microsoft...
As a general rule, Widevine-L3 is used at lower resolutions & bitrates. But that doesn't mean "You can't find Ultra HD contents with L3" (only a few examples out there).
At high resolutions & bitrates, you see Widevine-L1 and Playready-3. They work in the same manner (a decryption module previously-inserted into the processor by the manifacturer. Decryption takes place in the "trusted zone" of that processor)
What makes the things "more complicated" is, video-encoding style preferred by the streamer... For example, at a popular site, I understood that there are 3 different streamings: H264-encoded videos with two different bitrate adaptations (CVBR-Constrained Variable Bitrate and CBR-Constant Bitrate) and H265-encoded videos with CVBR...
There were 30 video streams in total: 12 "H264-CVBR", 9 "H264-CBR" and 9 "H265-CVBR" streams (each stream is at different resolution or/and bitrate)... And all of those streams were decryptable (meaning "L3-protected"). It is only a matter of accessing the manifests, getting PSSH, lic url and headers... (I'm talking about 1080p contents, I didn't access any UltraHD manifest).
Good luck. -
-
-
-
https://play.tv3.lt/series/jausmu-audros-,serial-3507045/serija-17,episode-3633805
Can someone help me to download this video with turkish language?
Unfortunately i can't obtain this video because it doesn't work for me -
Don't ask in more than 1 thread.
Already answered you here
https://forum.videohelp.com/threads/410589-need-help-downloading-from-RTE-player#post2700010 -
anybody know why is not working this anymore? anybody can share l3.py or l1.py working please? or just tell me how to fix it
-
raiplay is a simple one, the only problem is the token expire fast(about 10 seconds), and it is not one time used. so if you still want to use wks-keys, more difficult because you copy paste token to headers.py need long time. when you paste complete, the token expired, then you are failed.
append: my mistake, the token will alive about 20-30seconds, not 10 seconds. i tested this link:
Code:https://www.raiplay.it/video/2023/07/Delitti-in-Paradiso-S12E3-Un-tuffo-nel-passato-85d66bb8-11ec-40e2-bdbe-797bc4747151.html
[Attachment 75350 - Click to enlarge]
append: copy as curl(bash) is not necessary, at.least on raiplay it is.you can copy nv token from license request header directly, this will save your time.Last edited by shellcmd; 8th Dec 2023 at 13:01.
-
-
-
no, i dont use wks-keys or tpd-keys. i wrote script by myself. if you paste nv authorization very fast to headers.py ,save it then fast run l3.py, input pssh and license url, i think 20 seconds should enough.(see my append at last reply, my mistake, not 10 seconds, the token will alive about 20-30 seconds, i made a test.)
-
-
what wrong with this script? its already post while back
Code:from pathlib import Path import subprocess import requests import json import re import os from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) files_to_delete = ["key.txt"] for file_name in files_to_delete: if os.path.exists(file_name): os.remove(file_name) print(f"{file_name} file successfully deleted.") m3u8DL_RE = 'N_m3u8DL-RE.exe' def replace_invalid_chars(title: str) -> str: invalid_chars = {'<': '\u02c2', '>': '\u02c3', ':': '\u02d0', '"': '\u02ba', '/': '\u2044', '\\': '\u29f9', '|': '\u01c0', '?': '\u0294', '*': '\u2217'} return ''.join(invalid_chars.get(c, c) for c in title) print(f'\ntest link: https://www.raiplay.it/video/2023/02/Mare-fuori-S3E10-Le-regole-dell-amicizia-989f9b77-c4f5-4088-952d-c8c02ce7925f.html\ntest link: https://www.raiplay.it/video/2017/10/the-tourist-5e39a1fe-71ad-44a6-bb13-aa986670bce3.html\n') link = input('link: ') link_id = re.findall(r'(https://.*).html', link)[0].strip() headers00 = { 'Referer': 'https://www.raiplay.it/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', 'X-Caller-Version': '', 'x-ua-token': 'null', } response00 = requests.get(''+link_id+'.json',headers=headers00, verify=False).json() name_title = response00['program_info']['name'] toptitle = response00['toptitle'] title = f'{name_title} - {toptitle}' title = replace_invalid_chars(title) print(f'\ntitle:\n{title}\n') content_url = response00['video']['content_url'] relink_cont = re.findall(r'cont=(.*)', content_url)[0].strip() import requests headers02 = { 'authority': 'mediapolisvod.rai.it', 'origin': 'https://www.raiplay.it', 'referer': 'https://www.raiplay.it/', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', } params02 = { 'cont': relink_cont, 'output': '64', } response02 = requests.get('https://mediapolisvod.rai.it/relinker/relinkerServlet.htm', params=params02, headers=headers02, verify=False).text try: mpd = re.findall(r'CDATA\[(https.*?mpd.*?)\]', response02)[0].strip() print(f'original mpd:\n{mpd}\n') mpd = re.sub(r',filter=.*\)', r')', mpd) print(f'modified mpd:\n{mpd}\n') except IndexError: m3u8 = re.findall(r'\[(https://.*m3u8.*?)\]', response02)[0].strip() print(f'original m3u8:\n{m3u8}\n') m3u8 = re.sub(r'qual_.*/', r'qual_,1200,1800,2400,3600,5000/', m3u8) print(f'modified m3u8:\n{m3u8}\n') print() subprocess.run([m3u8DL_RE, '-M', 'format=mkv:muxer=ffmpeg', '--concurrent-download', '--auto-select', '--del-after-done', '--log-level', 'INFO', '--save-name', 'video', m3u8]) try: Path('video.mkv').rename(''+title+'.mkv') print(f'{title}.mkv \nall done!\n') except FileNotFoundError: print("[ERROR] no mkv file") for file_name in files_to_delete: if os.path.exists(file_name): os.remove(file_name) print(f"{file_name} file successfully deleted.") ex_it = input('\nPress Enter to Exit...') exit() import requests headers03 = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36', } response03 = requests.get(mpd, headers=headers03, verify=False).text pssh = re.findall(r'<cenc:pssh>(.{20,170})</cenc:pssh>', response03)[0].strip() print(f'\n{pssh}') lic_url = re.findall(r'licenceUrl\":\"(.*?)\"', response02)[0].strip() print(f'\n{lic_url}\n') try: nv_authorizations = re.findall(r'Authorization=(.*)', lic_url)[0].strip() print(f'\n{nv_authorizations}\n') except IndexError: nv_authorizations = re.findall(r'token=(.*)', lic_url)[0].strip() print(f'\n{nv_authorizations}\n') import requests headers_clone = { 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Origin': 'https://wvclone.fly.dev', 'Referer': 'https://wvclone.fly.dev/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36', } json_data_clone = { 'password': 'password', 'license': lic_url, 'headers': f'Connection: keep-alive\nnv-authorizations: "{nv_authorizations}"', 'pssh': pssh, 'buildInfo': '', 'cache': True, } clone_resp = requests.post('https://wvclone.fly.dev/wv', headers=headers_clone, json=json_data_clone, verify=False).text from bs4 import BeautifulSoup soup = BeautifulSoup(clone_resp, 'html.parser') li_s = soup.find_all('li') keys = [] for li in li_s: keys.append(li.text.strip()) key_s = ' '.join(['--key ' + key for key in keys]) print(f'\nkey(s):\n{key_s}') print(key_s, file=open("key.txt", "w")) with open("key.txt", "r") as fs: ke_ys = fs.readlines() ke_ys = ke_ys[0].strip().split() print() subprocess.run([m3u8DL_RE, '-M', 'format=mkv:muxer=ffmpeg', '--concurrent-download', '--auto-select', '--del-after-done', '--log-level', 'INFO', '--save-name', 'video', mpd, *ke_ys]) try: Path('video.mkv').rename(''+title+'.mkv') print(f'{title}.mkv \nall done!\n') except FileNotFoundError: print("[ERROR] no mkv file") for file_name in files_to_delete: if os.path.exists(file_name): os.remove(file_name) print(f"{file_name} file successfully deleted.")
-
i love this script but only works for the same, raiplay.it and call to a website with a clone json, to find the keys in a baseofdates, and download the video with re, we are talking about keys and fix our l3.py or l1.py to get the keys for ours method not with base of dates, not downloading videos with re, but thanks anyway
Last edited by marioeivissa; 8th Dec 2023 at 17:17.
-
thank you lomero, i understand but i dont want to download videos, just to know to fix my l3.py or l1.py, i like also yt-dlp, but i cant downloading videos without get first the keys, and in the case threre arent in base of dates in the web.....i prefer do by myself, but thank you anyway
-
L3.py from wks-keys? There is perfect fine
Are you thinking about getting keys from tv.Vodafone.es to fix l3.py? -
-
can you help please? im trying also to make scritp to get nv auth but imposible to know who or which url give to me this token, i was trying with every url and every json, datas, credentials, and bla bla bla, even if i block the license url, and i use this token...doesnt work, so im not sure if is time problem
-
for this link https://www.raiplay.it/programmi/vicinidelterzotipo
i need key only. l3 does not work -
Similar Threads
-
How to obtain key for playready?
By anime-hunter in forum Video Streaming DownloadingReplies: 32Last Post: 29th Mar 2025, 16:57 -
Playready
By hencha in forum Video Streaming DownloadingReplies: 11Last Post: 30th Jan 2023, 06:01 -
Can PlayReady be keys be acquired like Widevine?
By besweeet in forum Video Streaming DownloadingReplies: 9Last Post: 11th Jan 2023, 16:16 -
Playready DRM
By farafero21 in forum Video Streaming DownloadingReplies: 7Last Post: 17th Dec 2021, 15:45 -
RaiPlay Download
By ajones219 in forum Video Streaming DownloadingReplies: 17Last Post: 25th Nov 2021, 02:59