+ Reply to Thread
Results 271 to 300 of 358
-
Would someone please, please download this episode for me? TY for any help & happy holidays!
https://www.cbs.com/shows/video/ANvH0zgR54YaSuYnmRWTTP9K4pjqDD7d/ -
UPDATE: I still need to do more testing, but I believe they may have added a platform check on the authorization header. I was able to successfully retrieve keys using an authorization header that I pulled from a request made from an android phone (using HTTP Toolkit on a rooted phone to intercept requests).
I first tried changing the user agent alone and that did not work. Once I overrode the authorization header, it returned the keys without the error.
I'm going to have to pause on this for the moment, but I'll pick it back up when I have some more time. I think it's probably possible to get an android Auth token without actually using an android phone.
----------
Original message:
Is anyone else encountering an error getting keys from CBS? I started having issues yesterday. I'm now getting:
Code:License Response:'{"code":190120,"message":"No keys were added to the license response. The clients' platform status (noVerification) is restricted, the configured policies prevent the return of a license."}'
It seems to be an issue with all shows, including ones that I previously downloaded, but For reference, this is the file that I was trying to download: https://www.cbs.com/shows/video/F90CXi_JZ1y6cCOtFRDZ9rzEyaT6U8j0/Last edited by nitrogenferro; 17th Dec 2024 at 12:36.
-
use devine it will be fine...
[Attachment 84182 - Click to enlarge]
[Attachment 84183 - Click to enlarge] -
I started getting errors today in my script that had not been there before.
Code:Enter the CBS video URL: https://www.cbs.com/shows/video/F90CXi_JZ1y6cCOtFRDZ9rzEyaT6U8j0/ MPD URL: https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/13/2395344451892/3028413_cenc_dash/stream.mpd License URL: https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=F90CXi_JZ1y6cCOtFRDZ9rzEyaT6U8j0 PSSH: AAAAWHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADgIARIQe3Hc/j1QS/+M9Z7VblECkCIgRjkwQ1hpX0paMXk2Y0NPdEZSRFo5cnpFeWFUNlU4ajA4AQ== Failed to get keys for: https://www.cbs.com/shows/video/F90CXi_JZ1y6cCOtFRDZ9rzEyaT6U8j0/ Error: 403 Client Error: Forbidden for url: https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=F90CXi_JZ1y6cCOtFRDZ9rzEyaT6U8j0
-
-
The full license URL used for the POST I am using is:
Code:https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=fHtrW8UEVxmM1MQyLULzzlEXsMAg_gS4&at={TOKEN}&format=SMIL&assetTypes=HLS_AES|DASH_LIVE|DASH_CENC|DASH_CENC_HDR10|DASH_LIVE|DASH_TA|DASH_CENC_PS4&formats=MPEG-DASH,MPEG4,M3U
Edit: don't forget the Authorization headerLast edited by SaintyUK; 18th Dec 2024 at 06:17.
-
I tried that modifying the licence url as you described. Got the same result for me.
Code:Enter the CBS video URL: https://www.cbs.com/shows/video/_iGlSsaU32sGg_nbOlAs3JK0ZMQPbjhU/ MPD URL: https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/13/2395344451891/3035214_cenc_dash/stream.mpd License URL: https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=_iGlSsaU32sGg_nbOlAs3JK0ZMQPbjhU&at=eyJhbGciOiJIUzI1NiIsImtpZCI6IjNkNjg4NGJmLWViMDktNDA1Zi1hOWZjLWU0NGE1NmY3NjZiNiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhbm9ueW1vdXNfVVMiLCJlbnQiOlt7ImJpZCI6IkFsbEFjY2Vzc01haW4iLCJlcGlkIjoxOTA4fV0sImlhdCI6MTczNDU4MDU2MSwiZXhwIjoxNzM0NTg3NzYxLCJpc3MiOiJjYnMiLCJhaWQiOiJjYnNpIiwiaXNlIjp0cnVlLCJqdGkiOiJmMjFlOTYzYi04NGJkLTQ5MDctYjY2Mi0zNjQzYzMyNWEwNzMifQ.x4rnTvqb1b-QUTUP1nmh7KozQoH9VU6eIjeKTIt0iNM&format=SMIL&assetTypes=HLS_AES|DASH_LIVE|DASH_CENC|DASH_CENC_HDR10|DASH_LIVE|DASH_TA|DASH_CENC_PS4&formats=MPEG-DASH,MPEG4,M3U PSSH: AAAAWHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADgIARIQ6FCJAmUgRReO+4eQyfLRbyIgX2lHbFNzYVUzMnNHZ19uYk9sQXMzSkswWk1RUGJqaFU4AQ== Failed to get keys for: https://www.cbs.com/shows/video/_iGlSsaU32sGg_nbOlAs3JK0ZMQPbjhU/ Error: 403 Client Error: Forbidden for url: https://cbsi.live.ott.irdeto.com/widevine/getlicense?CrmId=cbsi&AccountId=cbsi&SubContentType=Default&ContentId=_iGlSsaU32sGg_nbOlAs3JK0ZMQPbjhU&at=eyJhbGciOiJIUzI1NiIsImtpZCI6IjNkNjg4NGJmLWViMDktNDA1Zi1hOWZjLWU0NGE1NmY3NjZiNiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhbm9ueW1vdXNfVVMiLCJlbnQiOlt7ImJpZCI6IkFsbEFjY2Vzc01haW4iLCJlcGlkIjoxOTA4fV0sImlhdCI6MTczNDU4MDU2MSwiZXhwIjoxNzM0NTg3NzYxLCJpc3MiOiJjYnMiLCJhaWQiOiJjYnNpIiwiaXNlIjp0cnVlLCJqdGkiOiJmMjFlOTYzYi04NGJkLTQ5MDctYjY2Mi0zNjQzYzMyNWEwNzMifQ.x4rnTvqb1b-QUTUP1nmh7KozQoH9VU6eIjeKTIt0iNM&format=SMIL&assetTypes=HLS_AES%7CDASH_LIVE%7CDASH_CENC%7CDASH_CENC_HDR10%7CDASH_LIVE%7CDASH_TA%7CDASH_CENC_PS4&formats=MPEG-DASH,MPEG4,M3U
Code:import json import re import time import os import yaml import subprocess import requests import xml.etree.ElementTree as ET from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH # Ozivine: CBS Video Downloader # Author: billybanana # Usage: enter the episode URL to retrieve the MPD, Licence, PSSH and Decryption keys. # eg: https://www.cbs.com/shows/video/HdpMvc29Rr9XhDRZ4a_RaDhtWL55Uuf9/ # Authentication: None # Geo-Locking: requires a US IP address # Quality: up to 1080p # Key Features: # 1. Extract Video ID: Parses the CBS URL and queries the page source code to extract the series name, season, and episode number. # 2. Extract PSSH: Retrieves and parses the MPD file to generate the PSSH data necessary for Widevine decryption. # 3. Fetch Decryption Keys: Uses the PSSH and license URL to request and retrieve the Widevine decryption keys. # 4. Print Download Information: Outputs the MPD URL, license URL, PSSH, and decryption keys required for downloading and decrypting the video content. # 5. Note: this script functions for encrypted video files only. # ANSI escape codes for colors class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' LIGHTBLUE = '\033[94m' RED = '\033[91m' GREEN = '\033[92m' YELLOW = '\033[93m' ORANGE = '\033[38;5;208m' # Load configuration def read_config(): config_path = os.path.join(os.path.dirname(__file__), 'config.yaml') with open(config_path, 'r') as file: config = yaml.safe_load(file) return config config = read_config() # Set the save path using downloads_path from config.yaml WVD_PATH = config['wvd_device_path'] SAVE_PATH = config['downloads_path'] # Function to define the download command def get_nm3u8_command(manifest, keys, video_name, save_path): key_string = ' '.join([f"--key {key}" for key in keys]) command = f'N_m3u8DL-RE.exe "{manifest}" --select-video best --select-audio lang=en:for=best --select-subtitle all -mt -M format=mkv:muxer=mkvmerge --save-name "{video_name}" --save-dir "{save_path}" {key_string}' return command # Function to extract maximum resolution from the manifest def get_max_resolution(manifest_content): root = ET.fromstring(manifest_content) max_height = 0 for representation in root.iter('{urn:mpeg:dash:schema:mpd:2011}Representation'): if "thumb" in representation.attrib.get('id', '').lower(): continue # Skip any representations that contain "thumb" height = int(representation.attrib.get('height', 0)) if height > max_height: max_height = height return f"{max_height}p" # Function to format the video name def format_video_name(title, resolution): # Remove the word "Watch" from the title title = title.replace("Watch ", "") # Extract the relevant parts of the title match = re.match(r'(.+) Season (\d+) Episode (\d+)', title) if not match: raise ValueError("Could not extract show name, season, or episode number from title.") show_name = match.group(1) season_number = int(match.group(2)) episode_number = int(match.group(3)) # Format the show name and episode information with leading zeros if necessary formatted_show_name = '.'.join(show_name.split()) formatted_season = f"S{season_number:02}" if season_number < 10 else f"S{season_number}" formatted_episode = f"E{episode_number:02}" if episode_number < 10 else f"E{episode_number}" video_name = f"{formatted_show_name}.{formatted_season}{formatted_episode}.{resolution}.CBS.WEB-DL.AAC2.0.H.264.mkv" return video_name # Function to get the manifest and Licence URL def get_episode_keys(cbs_url): user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0" response = requests.get(cbs_url, headers={ "User-Agent": user_agent }).content.decode() # Verify that the video URL matches the canonical link canonical_url = re.search(r'<link rel="canonical" href="(.+?)"/>', response).group(1) if cbs_url != canonical_url: raise ValueError("The provided URL does not match the canonical link on the page.") # Extract the title for naming the video title = re.search(r'<title>(.+?)</title>', response).group(1) # Extract the bearer token bearer = re.search(r'"Authorization":"(Bearer .+?)"', response).group(1) # Extract the manifest URL manifest = re.search(r'"streamingUrl":"(.+?)"', response) manifest = manifest.group(1).replace("\\/", "/") print(f"{bcolors.LIGHTBLUE}MPD URL: {bcolors.ENDC}{manifest}") # Extract the base license URL and append the new parameters base_license_url = re.search(r'"widevine":{"url":"(.+?)"', response).group(1).replace("\\/", "/") license_url = ( f"{base_license_url}&at={bearer.split(' ')[1]}" "&format=SMIL&assetTypes=HLS_AES|DASH_LIVE|DASH_CENC|DASH_CENC_HDR10|DASH_LIVE|DASH_TA|DASH_CENC_PS4" "&formats=MPEG-DASH,MPEG4,M3U" ) print(f"{bcolors.RED}License URL: {bcolors.ENDC}{license_url}") # Fetch and parse the manifest for maximum resolution manifest_content = requests.get(manifest).content.decode() max_resolution = get_max_resolution(manifest_content) # Format the video name with the correct resolution video_name = format_video_name(title, max_resolution) # Function to get PSSH from manifest URL pssh_value = str(min(re.findall(r'<cenc:pssh>(.+?)</cenc:pssh>', manifest_content), key=len)) pssh_value = PSSH(pssh_value) print(f"{bcolors.LIGHTBLUE}PSSH: {bcolors.ENDC}{pssh_value}") # Function to get keys using PSSH and license URL device = Device.load(WVD_PATH) cdm = Cdm.from_device(device) session_id = cdm.open() challenge = cdm.get_license_challenge(session_id, pssh_value) # Make the license request licence = requests.post(license_url, data=challenge, headers={ 'Authorization': bearer, }) # Parse the license response licence.raise_for_status() cdm.parse_license(session_id, licence.content) keys = [] for key in cdm.get_keys(session_id): if "CONTENT" in key.type: keys.append(f"{key.kid.hex}:{key.key.hex()}") cdm.close(session_id) # Format keys without list brackets formatted_keys = ' '.join([f"--key {key}" for key in keys]) print(f"{bcolors.GREEN}KEYS: {bcolors.ENDC}{formatted_keys}") # Generate the download command command = get_nm3u8_command(manifest, keys, video_name, SAVE_PATH) print(f"{bcolors.YELLOW}DOWNLOAD COMMAND: {bcolors.ENDC}{command}") return command # Function to process the download command def get_keys_for_episode(episode_url): try: command = get_episode_keys(episode_url) # Ask the user if they want to download user_input = input("Do you wish to download? Y or N: ").strip().lower() if user_input == 'y': subprocess.run(command, shell=True) return command except Exception as e: print(f"Failed to get keys for: {episode_url}\nError: {e}") return None # Prompt the user to enter the episode URL episode_url = input(f"{bcolors.LIGHTBLUE}Enter the CBS video URL: {bcolors.ENDC}") keys = get_keys_for_episode(episode_url)
-
i think he's means of at= {TOKEN}, that TOKEN's value is a constant value, you can find it from stablebrick's devine service, then give it a try. and better not public that value here.
but this is not the normal method, i still hope some big boss like pepe or aqzs or someone else to find out(reverse) the 'CMCD: mtp=400,ot=k,sf=d,sid="394823f8-fc98-4e36-9457-xxxxxxxxxxxx",su' part. -
-
I'd strongly recommend you study stabbedbybrick's code in detail, it has massive advantages
-
-
ah, make sense, thank you @z1269925944 for pointing it out.
and im wrong, the at = {TOKEN} part not simple as i thought. sorry for misleading bilybanana. -
Original message:
Is anyone else encountering an error getting keys from CBS? I started having issues yesterday. ]
Hello,
Yes, up to this day, I used getwvkeys or keysd websites to get the keys but now I receive the message:
Code:{"code":400,"error":true,"message":"Failed to get license: 400 Bad Request: Failed to get license: 403 Forbidden"}
I feel a bit late to the party because I see that in the meantime many ways to obtain keys have come up and I'm not sure which ones are still valid. -
I tried the Instructions from the first post:
https://forum.videohelp.com/threads/404994-Decryption-and-the-Temple-of-Doom
Unfortunately, i only see the ADS MPD from doubleclick in the Network Monitor during the Video already runs:
https://pubads.g.doubleclick.net/ondemand/dash/content/2497752/vid/ui_8HuDKUXvvuXrGymU...a9e420%22%2Csu
How to get the realy Video MPD to get the streams from the video url:
https://www.cbs.com/shows/video/ui_8HuDKUXvvuXrGymUSWB6hRzNf8ZVW/
Would be nice if someone can show me how to get it that i can continue on my own at my first try
Thanks! -
Code:
N_m3u8DL-RE "https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/04/2393038403894/3029636_cenc_dash/stream.mpd" --key e018df2dc51c4a4c88e51a6da0484a7e:3c968cf65fcbea15199d96e878d7ceac --save-dir "media\cbs_com" --save-name "An_Evening_With_Dua_Lipa" -M format=mkv
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
One option i had to change was the mkv muxing where i had to use the Shaka Packager:
N_m3u8DL-RE.exe https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/04/2393038403894/3029636_cenc_...ash/stream.mpd --key e018df2dc51c4a4c88e51a6da0484a7e:3c968cf65fcbea151 99d96e878d7ceac --save-dir media\cbs_com --save-name An_Evening_With_Dua_Lipa -M format=mkv:muxer=mkvmerge --use-shaka-packager
Otherwise i got an error regarding failed muxing mentioned also here:
https://forum.videohelp.com/threads/416159-N_m3u8DL-RE-Mux-failed-error-%28 -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Here we go again...
I was wondering if someone would be so kind to decrypt these programs for me, since I am much less experienced at this sort of thing.
https://www.cbs.com/shows/video/D5LibV45KFkPrViAdWwbG9bMcO6wzii6/
https://www.cbs.com/shows/video/4HKDkwu2eRk7RaqGAK9dgs6CkALfvGdG/
https://www.cbs.com/shows/video/FANiPxPcDMiKbe1pqdSj9rG2WMOEz3ha/
https://www.cbs.com/shows/video/rPKX_H_1EVV72JvsCmQf0L_8FMhyhB_G/
Thanks, and Merry Christmas. -
HTML Code:
N_m3u8DL-RE -mt -M format=mkv --del-after-done -sv best -sa best -ss all --save-name "Josh.Groban.&.Friends.Go.Home.for.the.Holidays.S2024E01" https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/11/2394780739889/3042710_cenc_dash/stream.mpd --key 6d8b77800a3f486b953c610dabd9b39a:a978dc026ef07c54717b815e9a212208
HTML Code:N_m3u8DL-RE -mt -M format=mkv --del-after-done -sv best -sa best -ss all --save-name "Nate.Bargatze’s.Nashville.Christmas.S2024E01.Nate.Bargatze's.Nashville.Christmas" https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/11/2394783299842/3038294_cenc_dash/stream.mpd --key 3a903a4313c64451967019d0ff673857:9ecf30e59bdf49fbea3b31fb3934a53a
HTML Code:N_m3u8DL-RE -mt -M format=mkv --del-after-done -sv best -sa best -ss all --save-name "The.National.Christmas.Tree.Lighting.S2024E01" https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/11/2394819651562/3046321_cenc_dash/stream.mpd --key 38441c7422684c2799b402813f343e23:521cf33e753c6a5c838cb83a5e8f571a
HTML Code:N_m3u8DL-RE -mt -M format=mkv --del-after-done -sv best -sa best -ss all --save-name "Christmas.with.Andrea.Bocelli.and.Friends.A.GRAMMY®.Holiday.Special.S2024E01" https://vod-gcs-cedexis.cbsaavideo.com/intl_vms/2024/12/17/2395938371781/3046948_cenc_dash/stream.mpd --key 197fa46205c449178a8aaa4c32446d25:05bf1bd8cd2d787a31c5e5e99fcd6e68
-
-
z1269925944Are you getting these from Devine? I am myself able to download and grab keys from Devine now still, ONLY. Previous scripts I had that required basic header info, PSSH, and license url no longer get keys.
So, I am just curious if you have a still working script/process. Or if you are also grabbing with Devine.
a site very similar to CBS where all their shows arewell things changed there as well, so I wanted to see how to still get those keys as well.
-
-
-
It is very strongly recommended to avoid referencing the freevine code from now on.
stabbedbybrick's devine services is what you are looking for. -
Yes PMPT is what I was referring too. I am looking thru Devine CBS service trying to adapt, and or figure things out. Have gotten no where thus far. Thanks. With whatever changed, there is no simple way with headers/Auth bearer and license url, pssh to grab keys? full header got me no where as well. Ill keep reading through.
Similar Threads
-
Download subtitles from CBS.com video streams
By BobbyGee2003 in forum SubtitleReplies: 1Last Post: 28th Apr 2020, 06:02 -
Portable DLer for CBS?
By KermitJ in forum Video Streaming DownloadingReplies: 22Last Post: 1st Feb 2020, 12:18 -
CBS Grammy Download
By ghostrewel in forum Video Streaming DownloadingReplies: 8Last Post: 14th Feb 2019, 22:02 -
Could someone help me download a CBS News video?
By GDev in forum Video Streaming DownloadingReplies: 4Last Post: 21st Sep 2018, 01:50 -
RTMP and CBS
By RBCC in forum Video Streaming DownloadingReplies: 1Last Post: 22nd Mar 2018, 08:21