https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=C1KrqCWRhfmaitSetissSla...gentRule=mpd-*
(note the parameters output=64 and overrideUserAgentRule)
With this url we obtain a xml with mpd and auth, replacing * with 5000 the error almost seems a suggestion:
Relinker Exception: Needed one of those content type (and bitrate if not *): mpd-5000
https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=C1KrqCWRhfmaitSetissSla...5000&output=64
(note the new parameter forceUserAgent=mpd-5000, output=64 as before)
This parameter looks promising...
I made a shell script to make the creation of the headers.py file faster:
replace ~/.local/cdm/headers.py to the path where your header.py is locatedCode:#|/bin/bash read -p "pssh: " pssh read -p "lic: " lic read -p "auth: " auth cat > ~/.local/cdm/headers.py << EOF import requests headers = { 'nv-authorizations': '$auth', } EOF l3.py $pssh $lic
l3.py is slightly modified to accept pssh and lic (license link) as parameters:
Code:#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Module: KEYS-L3 # Created on: 11-10-2021 # Authors: -∞WKS∞- # Version: 1.1.0 import base64, requests, sys, xmltodict import headers from pywidevine.L3.cdm import cdm, deviceconfig from base64 import b64encode from pywidevine.L3.getPSSH import get_pssh from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt def main(): # Verifica che siano forniti due argomenti if len(sys.argv) != 3: print("Sintassi: l3.py <pssh> <lic_url>") return # Leggi gli argomenti dalla riga di comando pssh = sys.argv[1] lic_url = sys.argv[2] correct, keys = WV_Function(pssh, lic_url) for key in keys: print('--key ' + key) def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) widevine_license = requests.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=headers.headers) license_b64 = b64encode(widevine_license.content) wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt if __name__ == "__main__": main()Now:Code:yt-dlp --allow-unplayable-formats "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=C1KrqCWRhfmaitSetissSlashRGgeeqqEEqualeeqqEEqual&forceUserAgent=mpd-5000&output=64"
Finally a decrypted video with a resolution of 1920x1080, same for audio (to do: remove the boring audio description)Code:mp4decrypt --key 32dfa84df6cd34299cfcb442e79e856e:c4a73b7fe7d15b5dcea1d94f6b2c80db obfuscate.mp4 clear.mp4
Edit:
I found a way to download only the audio part in italian:
Code:yt-dlp --allow-unplayable-formats -f "ba[language=Italiano]" "https://mediapolisvod.rai.it/relinker/relinkerServlet.htm?cont=C1KrqCWRhfmaitSetissSlashRGgeeqqEEqualeeqqEEqual&forceUserAgent=mpd-5000"
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.
+ Reply to Thread
Results 1 to 1 of 1
Thread
-
Last edited by lucacolaiacomo; 4th Sep 2024 at 03:21. Reason: Added quotes so that yt-dlp interprets the link correctly, a way to download only italian track
Similar Threads
-
Help with (cached) key RaiPlay
By misiek1963 in forum Video Streaming DownloadingReplies: 3Last Post: 6th Jun 2024, 12:16 -
AES 128 Key, How do i decrypt or find the key?
By GirlsGill in forum Video Streaming DownloadingReplies: 12Last Post: 12th Feb 2024, 08:03 -
how do i find the key for this
By jean jean in forum Video Streaming DownloadingReplies: 5Last Post: 18th Dec 2023, 05:06 -
Find Key for Iqiyi
By andertjf in forum Video Streaming DownloadingReplies: 9Last Post: 4th Feb 2023, 08:47 -
Trying to find key
By hansmellman in forum Video Streaming DownloadingReplies: 4Last Post: 23rd Sep 2022, 03:23