script already been post
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.")
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 31 to 60 of 83
-
-
I tested with script with the link https://www.raiplay.it/programmi/vicinidelterzotipo , it returned some error, maybe need some fix.
-
play video first then get link..
Code:https://www.raiplay.it/video/2023/12/Vicini-del-terzo-tipo-d9346011-40d7-4995-a542-93e013157089.html
[Attachment 75832 - Click to enlarge] -
great, i even not realized that the link will change when the video played. then script works, thanks iamghost.
-
thank shellcmd for your key
and thank also to iamghost: i've see your script but i get error like shellcmd ! with right full link to play, the script work fine. thank you both -
i get this error with this script before work some week ago "for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed" -
It's the same problem as the mediaset script: https://wvclone.fly.dev/wv is dead, so of course there's no server processing the license request for you to get the keys.
-
I cant do it.
When i paste this in wks-keys with codeCode:headers.py headers = { 'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"', 'x-dt-auth-token': 'eyJhbGciOiJIUzUxMiJ9.eyJjcnQiOiJbe1wiYWNjb3VudGluZ0lkXCI6XCI5MjViMGY0ZS0yMDg3LTRlNGYtODUxZS1hMmQ3NTM3NTYyMTRcIixcImFzc2V0SWRcIjpcInR2bWVkaWEtMjA0NzAwODhcIixcInByb2ZpbGVcIjp7XCJyZW50YWxcIjp7XCJhYnNvbHV0ZUV4cGlyYXRpb25cIjpcIjIwMjQtMDMtMTVUMDk6MDI6MDAuMTI2WlwiLFwicGxheUR1cmF0aW9uXCI6ODY0MDAwMDB9fSxcIm91dHB1dFByb3RlY3Rpb25cIjp7XCJkaWdpdGFsXCI6dHJ1ZSxcImFuYWxvZ3VlXCI6dHJ1ZSxcImVuZm9yY2VcIjpmYWxzZX0sXCJuck9mU2ltdWx0YW5lb3VzU3RyZWFtc1wiOjAsXCJzdG9yZUxpY2Vuc2VcIjpmYWxzZX1dIiwib3B0RGF0YSI6IntcIm1lcmNoYW50XCI6XCJhMmRcIixcInVzZXJJZFwiOlwiYWRtaW4tc3ViLXZpbW9uZFwiLFwic2Vzc2lvbklkXCI6XCJqbVFieks2UkkzQkw3aWRRRkJvTXdnPT1cIn0iLCJpYXQiOjE3MTA0MDY5MjAsImp0aSI6IlhCdUdXV2JBWnhvOVBocGhPNzNtQUE9PSJ9.i1IR54l5MqMwSqwzGC91k6aR95qboLUoDDwh7UUJtrZQNNcPsK_s0O6kqkn-XFCTk-6Xl3QL8wLR_zLTPOx_aQ', 'Referer': 'https://www.tv4play.se/', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'Content-Type': 'application/x-www-form-urlencoded', } params = { 'specConform': 'true', 'assetId': 'tvmedia-20470088', } data = '\b\x04' response = requests.post('https://lic46.drmtoday.com/license-proxy-widevine/cenc/', params=params, headers=headers, data=data)
I dont understand whats wrong -
headers.py looks like this:
Code:headers = { 'x-dt-auth-token': 'eyJhbGciOiJIUzUxMiJ9.eyJjcnQiOiJbe1wiYWNjb3VudGluZ0lkXCI6XCI5MjViMGY0ZS0yMDg3LTRlNGYtODUxZS1hMmQ3NTM3NTYyMTRcIixcImFzc2V0SWRcIjpcInR2bWVkaWEtMjA0NzAwODhcIixcInByb2ZpbGVcIjp7XCJyZW50YWxcIjp7XCJhYnNvbHV0ZUV4cGlyYXRpb25cIjpcIjIwMjQtMDMtMTVUMDk6MDI6MDAuMTI2WlwiLFwicGxheUR1cmF0aW9uXCI6ODY0MDAwMDB9fSxcIm91dHB1dFByb3RlY3Rpb25cIjp7XCJkaWdpdGFsXCI6dHJ1ZSxcImFuYWxvZ3VlXCI6dHJ1ZSxcImVuZm9yY2VcIjpmYWxzZX0sXCJuck9mU2ltdWx0YW5lb3VzU3RyZWFtc1wiOjAsXCJzdG9yZUxpY2Vuc2VcIjpmYWxzZX1dIiwib3B0RGF0YSI6IntcIm1lcmNoYW50XCI6XCJhMmRcIixcInVzZXJJZFwiOlwiYWRtaW4tc3ViLXZpbW9uZFwiLFwic2Vzc2lvbklkXCI6XCJqbVFieks2UkkzQkw3aWRRRkJvTXdnPT1cIn0iLCJpYXQiOjE3MTA0MDY5MjAsImp0aSI6IlhCdUdXV2JBWnhvOVBocGhPNzNtQUE9PSJ9.i1IR54l5MqMwSqwzGC91k6aR95qboLUoDDwh7UUJtrZQNNcPsK_s0O6kqkn-XFCTk-6Xl3QL8wLR_zLTPOx_aQ', }
data=xxxxxx, no need, it comes from CDM.
response=xxxx, no need.
delete all no need part. -
I write cmd in the path where i have headers.py and after that write the code
Code:headers = { 'x-dt-auth-token': 'eyJhbGciOiJIUzUxMiJ9.eyJjcnQiOiJbe1wiYWNjb3VudGluZ0lkXCI6XCI5MjViMGY0ZS0yMDg3LTRlNGYtODUxZS1hMmQ3NTM3NTYyMTRcIixcImFzc2V0SWRcIjpcInR2bWVkaWEtMjA0NzAwODhcIixcInByb2ZpbGVcIjp7XCJyZW50YWxcIjp7XCJhYnNvbHV0ZUV4cGlyYXRpb25cIjpcIjIwMjQtMDMtMTVUMDk6MDI6MDAuMTI2WlwiLFwicGxheUR1cmF0aW9uXCI6ODY0MDAwMDB9fSxcIm91dHB1dFByb3RlY3Rpb25cIjp7XCJkaWdpdGFsXCI6dHJ1ZSxcImFuYWxvZ3VlXCI6dHJ1ZSxcImVuZm9yY2VcIjpmYWxzZX0sXCJuck9mU2ltdWx0YW5lb3VzU3RyZWFtc1wiOjAsXCJzdG9yZUxpY2Vuc2VcIjpmYWxzZX1dIiwib3B0RGF0YSI6IntcIm1lcmNoYW50XCI6XCJhMmRcIixcInVzZXJJZFwiOlwiYWRtaW4tc3ViLXZpbW9uZFwiLFwic2Vzc2lvbklkXCI6XCJqbVFieks2UkkzQkw3aWRRRkJvTXdnPT1cIn0iLCJpYXQiOjE3MTA0MDY5MjAsImp0aSI6IlhCdUdXV2JBWnhvOVBocGhPNzNtQUE9PSJ9.i1IR54l5MqMwSqwzGC91k6aR95qboLUoDDwh7UUJtrZQNNcPsK_s0O6kqkn-XFCTk-6Xl3QL8wLR_zLTPOx_aQ', }
-
then there are something to attention:
1.the token maybe expire fast or just one time used, so you need copy paste as fast as you can, or block license request, get a no used token.
2.use correct license url, it should looks like
-
Hi, for raiplay you need the PSSH and as headers only the Nv-Authorizations
example
# send license challenge (assuming a generic license server SDK with no API front)
licence = requests.post("https://lic.drmtoday.com/license-proxy-widevine/cenc/", data=challenge,
headers={"Nv-Authorizations": "eyJ0aSI6ImZjMDc4MzJmODdiNjc5NDk1MTk2ZGJkZjMwZGYxY jgxIn0="}
)
lasts only a few seconds 15 or 20 at most.
-
Hi, I did as you said, but it keeps giving me this error
[Attachment 79926 - Click to enlarge]
https://www.raiplay.it/video/2024/06/Calcio-Euro-2024---Fase-a-gironi-Italia-Albania--...8fe673a39.html -
-
[Attachment 79931 - Click to enlarge]
I found the keys, but he still downloads it with protectionLast edited by supergirl73; 16th Jun 2024 at 14:00.
-
-
-
mpd url (will expire):
Code:https://streamcdnr12-b70cb04c54ab478189e9d8ee45637b13.msvdn.net/ostr1/podcastcdn/drm_root/DRMNagra_Euro_2024_multiaudio/23538280_,1800,2400/manifest_mvnumber.mpd?hdnea=st=1718626429~exp=1718626579~acl=/*~hmac=482139315e3103f8b348bbb613f3071a189dac2d46310aee2ae5b46745f4b3ed
Code:AAAAd3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFcIARIQeaGy6B22M9aNpzGJZrjonhoFTmFncmEiOmRybV9yb290L0RSTU5hZ3JhX0V1cm9fMjAyNF9tdWx0aWF1ZGlvLzIzNTM4MjgwXywxODAwLDI0MDA=
Code:79a1b2e81db633d68da7318966b8e89e:fab0cef39f66dbfd78b9f7cba53ff010
Code:N_m3u8DL-RE --key 79a1b2e81db633d68da7318966b8e89e:fab0cef39f66dbfd78b9f7cba53ff010 "https://streamcdnr12-b70cb04c54ab478189e9d8ee45637b13.msvdn.net/ostr1/podcastcdn/drm_root/DRMNagra_Euro_2024_multiaudio/23538280_,1800,2400/manifest_mvnumber.mpd?hdnea=st=1718626429~exp=1718626579~acl=/*~hmac=482139315e3103f8b348bbb613f3071a189dac2d46310aee2ae5b46745f4b3ed" -M mkv --save-name "Italia-Albania"
-
-
https://www.raiplay.it/video/2024/07/Calcio-Euro-2024---Quarti-Spagna-Germania---05-07...b37ef2931.html
good morning, I can't understand why the two kids don't match, I think the call is right
[Attachment 80451 - Click to enlarge]
in the previous post they told me that the key was right, but the video link was wrong, I saw that it changes continuously, but I can't put the right oneLast edited by supergirl73; 6th Jul 2024 at 01:46.
-
lol buy L1 cdm (about 400$)
or dump your L1 from your phone. read sticky thread about how to. good luck
or maybe, more easy, be happy to 720p -
L1 will not help to get 1080p. If you got 'UNGRANTED_REQUEST' it's because the nv-authorizations in the header only works for 720p.
-
L3 is enough for 1080p only the process to get it is not straightforward
720p key
Code:13b558b9e5cb3b969a4e25599d23623f:592141775a6b56f1caf0af030f3fd538
Code:20d5b1c51a47308c8df76565e81978d1:043d94a1b571d554c75fc08ffb4c3cc9
if that doesn't work with your link try this one:
Code:https://b70cb04c54ab478189e9d8ee45637b13.msvdn.net/ostr2/podcastcdn/drm_root/DRMNagra_Euro_2024_multiaudio/23696486_,1800,2400,3600,5000/manifest_mvnumber.mpd?hdnea=st=1720294810~exp=1720294960~acl=/*~hmac=acd99f939c12920c74a0eb12d5db68dbf81f2f182a99e15f8adad34febecdfda
Last edited by Goku73; 6th Jul 2024 at 14:43.
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