Hi! total noob here
Could someone give me a hand downloading this video, please?
https://www.rtbf.be/article/tour-de-belgique-mathieu-van-der-poel-decroche-l-etape-rei...taire-11214483
T.I.A![]()
+ Reply to Thread
Results 1 to 15 of 15
-
Last edited by nyvvo6430; 3rd Jul 2023 at 23:09.
-
belgium ip needed
[Attachment 72235 - Click to enlarge]
Code:from pathlib import Path import subprocess import requests import json import re import os 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('\ntest link: https://www.rtbf.be/article/tour-de-belgique-mathieu-van-der-poel-decroche-l-etape-reine-a-durbuy-en-leader-solitaire-11214483\n') link = input('link: ') import requests headers1 = { 'authority': 'exposure.api.redbee.live', 'content-type': 'application/json', 'origin': 'https://www.rtbf.be', 'referer': 'https://www.rtbf.be/', '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', } json_data1 = { 'device': { 'height': 0, 'width': 0, 'model': '', 'name': '', 'os': '', 'osVersion': '', 'manufacturer': '', 'type': 'WEB', }, 'deviceId': '123', } response1 = requests.post('https://exposure.api.redbee.live/v2/customer/RTBF/businessunit/Auvio/auth/anonymous', headers=headers1,json=json_data1).json() sessionToken = response1['sessionToken'] import requests headers2 = { 'authority': 'www.rtbf.be', 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', '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', } response2 = requests.get(link, headers=headers2).text grab_json = re.findall(r'<script id=\"__NEXT_DATA__\" type=\"application/json\">(.*)</script></body></html>', response2)[0].strip() grab_json = json.loads(grab_json) assetId = grab_json['props']['pageProps']['article']['blocks'][0]['content']['media']['assetId'] title = grab_json['props']['pageProps']['article']['blocks'][0]['content']['media']['title'] title = replace_invalid_chars(title) print(f'\n{title}') import requests headers3 = { 'authority': 'exposure.api.redbee.live', 'accept': 'application/json, text/javascript, */*; q=0.01', 'authorization': f'Bearer {sessionToken}', 'content-type': 'application/json', 'origin': 'https://www.rtbf.be', 'referer': 'https://www.rtbf.be/', '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', } response3 = requests.get('https://exposure.api.redbee.live/v2/customer/RTBF/businessunit/Auvio/entitlement/'+assetId+'/play?supportedFormats=dash&supportedDrms=widevine',headers=headers3).json() mpd = response3['formats'][0]['mediaLocator'] lic_url = response3['formats'][0]['drm']['com.widevine.alpha']['licenseServerUrl'] import requests headers04 = { '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', } response04 = requests.get(mpd, headers=headers04).text pssh = re.findall(r'<cenc:pssh>(.{20,170})</cenc:pssh>', response04)[0].strip() print(f'\n{pssh}') import requests headers_cdrm = { 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Origin': 'https://cdrm-project.com', 'Referer': 'https://cdrm-project.com/', '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_cdrm = { 'license': lic_url, 'headers': f'connection: keep-alive\n', 'pssh': pssh, 'buildInfo': '', 'proxy': '', 'cache': True, } cdrm_resp = requests.post('https://cdrm-project.com/wv', headers=headers_cdrm, json=json_data_cdrm).text from bs4 import BeautifulSoup soup = BeautifulSoup(cdrm_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.")
-
Could you provide a download link , please? Like I said before you are speaking to a total newbie.
i would be very grateful. -
sk8ordi3 has given you the crown-jewels yet you ask for a biscuit. Proclaiming yourself 'newbie' implies an intention to learn. But apparently, with you, that is not the case.
If all this, on the forum, is new to you, and it was new to all of us once, take some time to learn how to run a python script on your computer at the very least. If you've been to school in the last 30 years, setting up a machine to run a program shouldn't be alien to you.
If all you wanted originally was a download link with no intention of actually learning anything - be honest and say so - and then the good folks here could ignore you or direct you to a torrent site.
sk8ordi3 has put in lots of work to respond to you, carefully and precisely, to enable a simple download. But not of just one video but any video from RTBF. You cannot even say thank you before demanding an easier solution. -
In the first place, it was not my intention to belittle the work of sk8ordi3, quite the opposite, I thank him very much for taking the time to answer me with such a detailed post...
Of course I want to learn, but honestly I don't see myself capable of performing such a feat, despite having attended school in the last 30 years...Maybe it's easy for you, it's not for me. I don't think I've committed any crime for this. What's more, I don't even speak English correctly since it's not my first language.
My only intention was to know if some kind forum member could help me by posting a download link (maybe I should have made it clear in my initial post). As simple as that.
Still, I appreciate your willingness to encourage me to learn. I promise I'll try.
Regards.Last edited by nyvvo6430; 4th Jul 2023 at 06:14.
-
You are French-Canadian, that much is obvious. You are pretty bilingual from birth in Quebec, are you not? You've been on the forum for 9 months. You've had help from ss(vegeta} and cryman-chen. And your response to their help was 'I've learnt a lot' - or a good approximation. So put your learning to use. Google 'How to run a python script' and do some work yourself. And stop pretending you are a newbie - that time has passed.
-
and with this link, he has again learned nothing...
@nyvvo6430
others would have been different if you got stuck installing python or running a script,
you would have been given directions for that too,
but you didn't even try...
so you don't have to explain the bullshit.. -
@sk8ordi3 Thanks for this "one-click" script. Could this be made compatible with auvio.rtbf.be links?
-
[Attachment 72249 - Click to enlarge]
5ce26d669dae272f28b64543b956d113:94d63e028a7ce8b85 a05ff25e0d7f9eb
472ce48574c08236b34be16db0fc8459:1d1843ce1b5ba457e 261b097e83e2523
3ad19d389733bb67b48538fbee7b7cfc:1433b4a045de3b3d1 ef0090095c81fdd
[Attachment 72250 - Click to enlarge] https://www.ctv.ca/shows/the-amazing-race-canada/i-hate-pancakes-s9e1 can you please give me the description code for the 3, how to attach it in cmd from the itv hub, only two keys are generated, but there are 3 keys here and I don't know how to put it in cmd, what kind of codes can you help me with, thank you -
I help all that ask.
-
-
-
DO NOT ASK your questions in the thread that has nothing to do with your post It is simple netiquette to not to dump your verbage anywhere and everywhere.
You've been here
https://forum.videohelp.com/threads/401859-How-to-download-mpd-stream-%28DRM-protected...32#post2695332
or here
https://forum.videohelp.com/threads/407635-Crash-course-on-downloading-ITVx-hub-please...11#post2695711
So stay there until your topic changes. Numpty
Similar Threads
-
downloading a drm protected video
By thitom in forum Video Streaming DownloadingReplies: 21Last Post: 23rd Mar 2025, 09:30 -
Downloading DRM protected video and decrypt with a known key
By fvh78870 in forum Video Streaming DownloadingReplies: 32Last Post: 1st Aug 2023, 07:05 -
Willing to pay for Help downloading DRM protected video within a player
By shruru in forum Video Streaming DownloadingReplies: 0Last Post: 29th Apr 2023, 12:18 -
Downloading DRM protected video from LOOKE's platform
By Blue Boy in forum Video Streaming DownloadingReplies: 1Last Post: 24th Apr 2021, 16:29 -
help downloading DRM protected video
By Lionking in forum Video Streaming DownloadingReplies: 16Last Post: 5th Feb 2021, 23:53