Hello folks,
I am trying to download a recap video from NBA.com. Here is the video link:
https://www.nba.com/game/hou-vs-ind-0022300719%3Fwatch?watchRecap=true
I prepared a script to send a POST request to the Widevine to obtain the key, here is the code:
PSSH before base64 obtained from EME Logger:Code:import requests # Endpoint URL url = "https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId=NBA_202402062235NBA_____VIDEOS__NBAE_2719841_Jitp_Reach_HD&sessionId=a9573095-b421-407c-9ab5-3470dce4affe&is_dvr=false" # Header headers = { "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9,tr;q=0.8,az;q=0.7", "ApplicationToken": "NBA_202402052236NBA_____VIDEOS__NBAE_2719496", "AuthorizationToken": "AuthToken1pVHbbtQwFPya5i0r3y8PeYjawlaooIqtFvHmy3ETNom3sdNt-Hrc0oKEACEhWcdH4zlzRp528T1MDpou52M6o-0ZeVPODMPaT3dHM-d1c5yjN5vJmk1-oG6Ii9-4OBZWdZXSAvMvsymnv4w8cX9SXQejSZvHcUjRHDdxvivoKZVCEOLlei69hyn3eS2tG0w_Pr1PZoRmSTUDF6jWrEZMuJoxaWuDJapxUMIG4wGsrXYwmSlf-cZDMMuQqwt46B0U4MuBP3R46uqoeKjpsuD6PmRdd8OIU75Hh0PUL-zdeoTmKqadsQPkqh2GeAL_Kp1-aN8mmIvyv3prnYvLszkqmfRSKw9YEotBBASYhGCRCRIZZbThgBSihlgGwRIbUDCAJBYyMB6Kz2cHLwb-W-63UY29m2OKIb8E-hqWegpL_CGsOQ7QpMUmN_cW5qpdchfn_qvJfZyuTTo0mGvMKKNccIxpMcyZ0pIQijVDQisihFKUYMa1UIRzzDERmiukleCIYEI1oQxhWnouCSOKY1EaVV0-HvsZ0oepKV-vleYa4ep8BpPBfwclwZIX8B2sb5feN04TyRlhNXDpaxY8r8tuqB1QL5VD3HFcba_b84_blnDRnJZPLsB2Pf-8bjF53-9vdx3f7_ubez5fKH2JT3Yr9C29oZdn1H8D", "AzukiIMC": "IMC7.2.0_AN_D3.0.0_S0", "Connection": "keep-alive", "Content-Length": "3992", "Content-Type": "text/plain", "Host": "ottapp-appgw-amp.nba.com", "Origin": "https://www.nba.com", "Referer": "https://www.nba.com/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-site", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "X-LocationDetails": '{"PostalCode":"06570","CountryCode":"TR"}', "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"macOS"', "DeviceProfile": "eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNpb24iOiIxMC4xNS43IiwidmVuZG9yTmFtZSI6IkFwcGxlIiwib3NOYW1lIjoiSFRNTDUiLCJ3dkxldmVsIjoiTDMiLCJkZXZpY2VVVUlEIjoiNzdkNzc4MzBhNTU4NDdhN2I3NzY4ZGFkNjNiNTZkNGUifQ==" } pssh_data = b'\x00\x00\x00\x80pssh\x00\x00\x00\x00\xed\xef\x8b\xa9y\xd6J\xce\xa3\xc8\'\xdc\xd5\x1d!\xed\x00\x00\x00`\x08\x01\x12\x10\xb8\xab@(\x03\xbe\xb8\xe7\xbb\xcd\xca+\x8eh\xf5\x87\x1a\x0cmediakindnba":NBA_202402062235NBA_____VIDEOS__NBAE_2719841_Jitp_Reach_HD2\x00' response = requests.post(url, headers=headers, data=pssh_data) if response.status_code == 200: print("OK") else: print("NOT OK", response.status_code) print(response.content)
I get the following error:Code:AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGAIARIQuKtAKAO+uOe7zcorjmj1hxoMbWVkaWFraW5kbmJhIjpOQkFfMjAyNDAyMDYyMjM1TkJBX19fX19WSURFT1NfX05CQUVfMjcxOTg0MV9KaXRwX1JlYWNoX0hEMgA=
Thank you to all of you that trying to help, upfront!Code:b'<error>\n <checksum>567607f7018ab4f0932052f54bfcb19c</checksum>\n <version>4.6.31.0.10</version>\n <code>3313</code>\n <az_err>1370</az_err>\n <message>rights: Missing service collection ID</message>\n</error>\n'
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 62
-
-
Code:
--key b8ab402803beb8e7bbcdca2b8e68f587:ecc693579cf87b70651843297a52b29e
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
-
I sent this message via DM but I want to let others also know the process.
Hello. It did not work, unfortunately. However, maybe, could be, there is a step that I'm missing.
Here are the steps that I followed.
I downloaded the video via the FetchV extension of Chrome(To make the download process more practical, I will be trying ffmpeg from now on)
I uploaded the video to my Google drive you can check it from here: https://drive.google.com/file/d/17mlgLICY5uQ7qJ0CKN95MD1CPgHvT0Sz/view?usp=sharing
Then I used the following code to decrypt the video:
Code:mp4decrypt --key b8ab402803beb8e7bbcdca2b8e68f587:ecc693579cf87b70651843297a52b29e game.mp4 gggg.mp4
Last edited by doganjr; 9th Feb 2024 at 03:51.
-
I tested the key and it works. You can download the video from here: https://www.transfernow.net/en/bld?utm_source=20240207dhaXaWr4
Now, what exactly went bad for you. I wouldn't say your script idea is wrong but it is incomplete. Just by looking at your imports, you are using only the requests library which is good, yeah, but it is not enough. If you want to write your own script that communicates with a Widevine license server you gotta understand the entire communication protocol. It's not enough to just send a pssh, and some headers, and be done, you get the keys. There's way more stuff going in the background regarding their protocol (this is why you get the error: rights: Missing service collection ID). But why would you try to reinvent the wheel? There are already existing implementations.
One of them is pywidevine -> https://github.com/devine-dl/pywidevine
If this is your first time I recommend you read from scratch the entire sticky threads. Angela and cedric offered some amazing explanations.
The script I used is:
Code:import requests from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH LICENSE_URL = "https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId=NBA_202402062235NBA_____VIDEOS__NBAE_2719841_Jitp_Reach_HD&sessionId=a9573095-b421-407c-9ab5-3470dce4affe&is_dvr=false" PSSH_VALUE = "AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGAIARIQuKtAKAO+uOe7zcorjmj1hxoMbWVkaWFraW5kbmJhIjpOQkFfMjAyNDAyMDYyMjM1TkJBX19fX19WSURFT1NfX05CQUVfMjcxOTg0MV9KaXRwX1JlYWNoX0hEMgA=" WVD_FILE = "./device_wvd_file.wvd" LICENSE_HEADERS = { "AuthorizationToken": "AuthToken1pVHbbtQwFPya5i0r3y8PeYjawlaooIqtFvHmy3ETNom3sdNt-Hrc0oKEACEhWcdH4zlzRp528T1MDpou52M6o-0ZeVPODMPaT3dHM-d1c5yjN5vJmk1-oG6Ii9-4OBZWdZXSAvMvsymnv4w8cX9SXQejSZvHcUjRHDdxvivoKZVCEOLlei69hyn3eS2tG0w_Pr1PZoRmSTUDF6jWrEZMuJoxaWuDJapxUMIG4wGsrXYwmSlf-cZDMMuQqwt46B0U4MuBP3R46uqoeKjpsuD6PmRdd8OIU75Hh0PUL-zdeoTmKqadsQPkqh2GeAL_Kp1-aN8mmIvyv3prnYvLszkqmfRSKw9YEotBBASYhGCRCRIZZbThgBSihlgGwRIbUDCAJBYyMB6Kz2cHLwb-W-63UY29m2OKIb8E-hqWegpL_CGsOQ7QpMUmN_cW5qpdchfn_qvJfZyuTTo0mGvMKKNccIxpMcyZ0pIQijVDQisihFKUYMa1UIRzzDERmiukleCIYEI1oQxhWnouCSOKY1EaVV0-HvsZ0oepKV-vleYa4ep8BpPBfwclwZIX8B2sb5feN04TyRlhNXDpaxY8r8tuqB1QL5VD3HFcba_b84_blnDRnJZPLsB2Pf-8bjF53-9vdx3f7_ubez5fKH2JT3Yr9C29oZdn1H8D", "AzukiIMC": "IMC7.2.0_AN_D3.0.0_S0", "DeviceProfile": "eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNpb24iOiIxMC4xNS43IiwidmVuZG9yTmFtZSI6IkFwcGxlIiwib3NOYW1lIjoiSFRNTDUiLCJ3dkxldmVsIjoiTDMiLCJkZXZpY2VVVUlEIjoiNzdkNzc4MzBhNTU4NDdhN2I3NzY4ZGFkNjNiNTZkNGUifQ==" } pssh = PSSH(PSSH_VALUE) device = Device.load(WVD_FILE) cdm = Cdm.from_device(device) session_id = cdm.open() challenge = cdm.get_license_challenge(session_id, pssh) licence = requests.post(LICENSE_URL, headers=LICENSE_HEADERS, data=challenge) licence.raise_for_status() cdm.parse_license(session_id, licence.content) for key in cdm.get_keys(session_id): print(f"[{key.type}] {key.kid.hex}:{key.key.hex()}") cdm.close(session_id)
Then using that key you can download the video. Use the stream detector. Get the index m3u8 link and copy it as a N_m3u8 command.
[Attachment 76839 - Click to enlarge]
Open the CMD or bash or whatever, and paste that command. To that command add the following:
Code:-M format=mkv --key b8ab402803beb8e7bbcdca2b8e68f587:ecc693579cf87b70651843297a52b29e
[Attachment 76840 - Click to enlarge]
Oops, didn't notice the comment. Thanks for confirming.Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 7th Feb 2024 at 07:59.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
[QUOTE=2nHxWW6GkN1l916N3ayz8HQoi;2723165]
If this is your first time I recommend you read from scratch the entire sticky threads. Angela and cedric offered some amazing explanations.
The script I used is:
Code:import requests from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH LICENSE_URL = "https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId=NBA_202402062235NBA_____VIDEOS__NBAE_2719841_Jitp_Reach_HD&sessionId=a9573095-b421-407c-9ab5-3470dce4affe&is_dvr=false" PSSH_VALUE = "AAAAgHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGAIARIQuKtAKAO+uOe7zcorjmj1hxoMbWVkaWFraW5kbmJhIjpOQkFfMjAyNDAyMDYyMjM1TkJBX19fX19WSURFT1NfX05CQUVfMjcxOTg0MV9KaXRwX1JlYWNoX0hEMgA=" WVD_FILE = "./device_wvd_file.wvd" LICENSE_HEADERS = { "AuthorizationToken": "AuthToken1pVHbbtQwFPya5i0r3y8PeYjawlaooIqtFvHmy3ETNom3sdNt-Hrc0oKEACEhWcdH4zlzRp528T1MDpou52M6o-0ZeVPODMPaT3dHM-d1c5yjN5vJmk1-oG6Ii9-4OBZWdZXSAvMvsymnv4w8cX9SXQejSZvHcUjRHDdxvivoKZVCEOLlei69hyn3eS2tG0w_Pr1PZoRmSTUDF6jWrEZMuJoxaWuDJapxUMIG4wGsrXYwmSlf-cZDMMuQqwt46B0U4MuBP3R46uqoeKjpsuD6PmRdd8OIU75Hh0PUL-zdeoTmKqadsQPkqh2GeAL_Kp1-aN8mmIvyv3prnYvLszkqmfRSKw9YEotBBASYhGCRCRIZZbThgBSihlgGwRIbUDCAJBYyMB6Kz2cHLwb-W-63UY29m2OKIb8E-hqWegpL_CGsOQ7QpMUmN_cW5qpdchfn_qvJfZyuTTo0mGvMKKNccIxpMcyZ0pIQijVDQisihFKUYMa1UIRzzDERmiukleCIYEI1oQxhWnouCSOKY1EaVV0-HvsZ0oepKV-vleYa4ep8BpPBfwclwZIX8B2sb5feN04TyRlhNXDpaxY8r8tuqB1QL5VD3HFcba_b84_blnDRnJZPLsB2Pf-8bjF53-9vdx3f7_ubez5fKH2JT3Yr9C29oZdn1H8D", "AzukiIMC": "IMC7.2.0_AN_D3.0.0_S0", "DeviceProfile": "eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNpb24iOiIxMC4xNS43IiwidmVuZG9yTmFtZSI6IkFwcGxlIiwib3NOYW1lIjoiSFRNTDUiLCJ3dkxldmVsIjoiTDMiLCJkZXZpY2VVVUlEIjoiNzdkNzc4MzBhNTU4NDdhN2I3NzY4ZGFkNjNiNTZkNGUifQ==" } pssh = PSSH(PSSH_VALUE) device = Device.load(WVD_FILE) cdm = Cdm.from_device(device) session_id = cdm.open() challenge = cdm.get_license_challenge(session_id, pssh) licence = requests.post(LICENSE_URL, headers=LICENSE_HEADERS, data=challenge) licence.raise_for_status() cdm.parse_license(session_id, licence.content) for key in cdm.get_keys(session_id): print(f"[{key.type}] {key.kid.hex}:{key.key.hex()}") cdm.close(session_id)
Code:Error 403: <error> <checksum>8ccf6289f610170a25fa49f6f7f04d73</checksum> <version>4.6.33.0.12</version> <code>7027</code> <az_err>1554</az_err> <message>out of country blocked because client is neither in home country nor in content portability region</message> </error>
could you explain me why I hace that error?
regards -
Why is showing me this error
Code:Error 403: <error> <checksum>8ccf6289f610170a25fa49f6f7f04d73</checksum> <version>4.6.33.0.12</version> <code>7027</code> <az_err>1554</az_err> <message>out of country blocked because client is neither in home country nor in content portability region</message> </error>
-
I'm getting the same error on cdrm-project.com but I'm successfully getting keys with WKS.
The video plays fine without VPN and I'm from a shithole country in Europe.
So probably the CDM used by cdrm-project.com got banned for NBA? -
NBA League Pass is not geo locked because it's available in over 200 countries...
-
I try to use another NBA video using cdrm-project.com and http://108.181.133.95:8080/ are 403 results Can you help me?
-
Here is the downloader for nba.com. It can only be used for free videos (with and without an account, and also both classic videos and game recaps).
Code:import json import re import urllib.parse import requests from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH AZUKI_IMC = "IMC7.2.0_AN_D3.0.0_S0" DEVICE_PROFILE = "eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNpb24iOiIxMCIsInZlbmRvck5hbWUiOiJNaWNyb3NvZnQiLCJvc05hbWUiOiJIVE1MNSIsInd2TGV2ZWwiOiJMMyIsImRldmljZVVVSUQiOiJkZXZpY2VVVUlEIn0=" EMAIL = 'YOUR_EMAIL' PASSWORD = 'YOUR_PASSWORD' NBA_PLAY_OPTIONS = 'https://ottapp-appgw-client.nba.com/S1/subscriber/{path}/{program_id}/play-options' NBA_ROLL = 'https://ottapp-appgw-amp.nba.com/v1/client/roll' NBA_API_STS = 'https://identity.nba.com/api/v1/sts' NBA_API_AUTH = 'https://identity.nba.com/api/v1/auth' LICENSE_URL = "https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license" WVD_FILE = "./device_wvd_file.wvd" def get_pssh_info(base_uri, manifest_uri): manifest = f"{base_uri}/{manifest_uri}" + '&sessionId=sessionId' v_m3u8 = re.findall(r'^v.*?\.m3u8\?.*?$', requests.get(manifest).content.decode(), re.MULTILINE)[-1] v_m3u8 = f"{base_uri}/{manifest_uri.replace('index.m3u8', v_m3u8)}" pssh = re.search(r'base64,([^"]+)"', requests.get(v_m3u8).content.decode()).group(1) return manifest, pssh def get_program_info(source_url): if "/video/" in source_url: return "v3/programs", re.findall( r'"mediakindExternalProgramId":"([^"]*)"', requests.get(source_url).content.decode() )[0] if "/game/" in source_url: return "v2/events", max(re.findall(r'\d+', source_url), key=len) return None, None def get_auth_token(): for info in [EMAIL, PASSWORD]: if info is None or len(info) == 0: return json.loads(requests.get(NBA_API_STS).content.decode())["data"]["AccessToken"] response = json.loads(requests.post( NBA_API_AUTH, json={'email': EMAIL, 'password': PASSWORD} ).content.decode())["data"] nba_identity = urllib.parse.quote(json.dumps( {"jwt": response["jwt"], "refreshToken": response["refreshToken"]} )) return json.loads(requests.get( NBA_API_STS, cookies={'nbaidentity': nba_identity} ).content.decode())["data"]["AccessToken"] AUTH_TOKEN = get_auth_token() def get_video_data(source_url): path, program_id = get_program_info(source_url) response = requests.get( NBA_PLAY_OPTIONS.format(path=path, program_id=program_id), headers={'Authorization': f'OAUTH2 access_token="{AUTH_TOKEN}"'}, params={'IsexternalId': 'true'} ).content.decode() matches = re.findall(r'"Id":"([^"]*)"', response) vod_id = sorted( [r for r in matches if "VIDEO" in r] if "VIDEO" in str(matches) else matches, key=len, reverse=True )[0] response = json.loads(requests.post( NBA_ROLL, data="{}", params={'ownerUid': 'azuki', 'mediaId': vod_id, 'sessionId': 'sessionId'}, headers={'AuthorizationToken': AUTH_TOKEN, 'AzukiIMC': AZUKI_IMC, 'DeviceProfile': DEVICE_PROFILE}, ).content.decode()) manifest, pssh = get_pssh_info( response["response"]["cdns"]["cdn"][0]["base_uri"], response["response"]["manifest_uri"], ) return manifest, pssh, vod_id def get_keys(pssh_value, vod_id): if pssh_value is None or vod_id is None: return [] pssh = PSSH(pssh_value) device = Device.load(WVD_FILE) cdm = Cdm.from_device(device) cdm_session_id = cdm.open() challenge = cdm.get_license_challenge(cdm_session_id, pssh) licence = requests.post( LICENSE_URL, data=challenge, headers={"AuthorizationToken": AUTH_TOKEN, 'DeviceProfile': DEVICE_PROFILE, 'AzukiIMC': AZUKI_IMC}, params={"ownerUid": "azuki", "mediaId": vod_id, "sessionId": "sessionId"} ) licence.raise_for_status() cdm.parse_license(cdm_session_id, licence.content) keys = [] for key in cdm.get_keys(cdm_session_id): if "CONTENT" in key.type: keys += [f"{key.kid.hex}:{key.key.hex()}"] cdm.close(cdm_session_id) return keys def get_download_command(source_url): manifest, pssh_value, vod_id = get_video_data(source_url) keys = get_keys(pssh_value, vod_id) if len(keys) == 0: return f"N_m3u8DL-RE.exe {manifest} -M format=mkv" return f'N_m3u8DL-RE.exe "{manifest}" {" ".join([f"--key {k}" for k in keys])} -M format=mkv' SOURCE_URLS = [ # Without account "https://www.nba.com/watch/video/game-recap-lakers-120-timberwolves-109", "https://www.nba.com/watch/video/the-fast-break-mar-10-2", "https://www.nba.com/watch/video/game-recap-wizards-110-heat-108", "https://www.nba.com/game/hou-vs-ind-0022300719?watchRecap=true", "https://www.nba.com/game/mil-vs-lac-0022300924?watchRecap=true", "https://www.nba.com/game/ind-vs-orl-0022300928?watchRecap=true", # With (free) account "https://www.nba.com/watch/video/2016-dunk-contest-lavine-vs-gordon-best-ever", "https://www.nba.com/watch/video/2-27-2023-banchero-takes-over-in-clutch-vs-pels", "https://www.nba.com/watch/video/12-7-23-haliburton-shines-in-in-season-tournament", ] for s in SOURCE_URLS: print(get_download_command(s))
Code:N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202403110042NBA_____VIDEOS__NBAE_2730310/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 5ebee3c8d5e10606e92be5bb4fad2dab:80f3b559dedfcba9092fff0abf666aad -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_436C1F6E-DF62-11EE-967D-3CFDFEE7DB71/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 843e4a9d08bab7caa44ba37d33b08201:b02e50d244af1e211edc730b15f56b6a -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202403102202NBA_____VIDEOS__NBAE_2730223/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 13701f9eefda552a1dcb4043a14e899c:8096b4a869983f8fa775787fbda20669 -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202402062235NBA_____VIDEOS__NBAE_2719841/index.m3u8?addUserInfo=1&sessionId=sessionId" --key b8ab402803beb8e7bbcdca2b8e68f587:ecc693579cf87b70651843297a52b29e -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202403101839NBA_____VIDEOS__NBAE_2730064/index.m3u8?addUserInfo=1&sessionId=sessionId" --key a28f78780df93c40c3537bef7423b38e:b6436ef1665c8474d48c943440ee5303 -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202403102200NBA_____VIDEOS__NBAE_2730212/index.m3u8?addUserInfo=1&sessionId=sessionId" --key f81eb304966d19d02bd90d27522ff25d:11cfe5b53309cfb500c47db09ad7dc82 -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202301290937NBA_____VIDEOS__NBAE_2630941/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 964f42e46638932b33427461f136459f:06ee868164f7d156637fde3fa500a671 -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202401301756NBA_____VIDEOS__NBAE_2717587/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 6eb0a05cb4fe3dd565df106a02d2419c:eb8f629dc8354f593ce2059a12a75a0b -M format=mkv N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202402121203NBA_____VIDEOS__NBAE_2721586/index.m3u8?addUserInfo=1&sessionId=sessionId" --key b7866579c32ff24d52882fe194a2ac99:f9fe7b15d02deca76749b80963e68252 -M format=mkv
Also, their API was kinda inconsistent in some responses so the script may not work for the rare video once in a while. Regardless, if there are problems, just leave a message here and I may take a look.
Edit: Seems I kinda praised their login functionality a bit too much. Now the script works fully programmatically without needing to check for existing browser cookies. If you have an account just fill in your email and password. If you just want videos without needing a free account, just make the EMAIL and PASSWORD variables empty strings (the script will obviously fail then if you attempt to download account-required videos).
Edit2: I've seen that some users needed a US VPN. So if something fails, I guess try with that.
Edit3: The m3u8 files have now a sessionId query parameter. You get 400 without one.
Edit4: This script has been added and extended in the widefrog tool so I won't maintain it here. Any relevant updates will take place in the support thread.Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 21st May 2024 at 04:24.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
A new code error occurs after running
File "/Users/czm/Downloads/m3u8tools/pywidevine-master/pywidevine/nbadl.py", line 125, in <module>
print(get_download_command(s))
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/czm/Downloads/m3u8tools/pywidevine-master/pywidevine/nbadl.py", line 103, in get_download_command
manifest, pssh_value, vod_id = get_video_data(source_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/czm/Downloads/m3u8tools/pywidevine-master/pywidevine/nbadl.py", line 70, in get_video_data
response["response"]["cdns"]["cdn"][0]["base_uri"],
~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'cdns' -
use this i get this error code“python nbatest.py
Traceback (most recent call last):
File "/Users/czm/Downloads/m3u8tools/pywidevine-master/pywidevine/nbatest.py", line 23, in <module>
licence.raise_for_status()
File "/Users/czm/Downloads/m3u8tools/pywidevine-master/env/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 469 Client Error: Unknown for url: https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId...e&is_dvr=false
” -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 12th Mar 2024 at 01:03.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
Sent you a PM. Debugging remotely it's gonna suck if I can't replicate the issue.
Edit: I tried simulating running the script as if from another machine and I get a "similar" error as you got (I don't know what's your exact error though). Now if what you get is something along the lines of:
'message': 'out of country blocked because client is neither in home country nor in content portability region'Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 12th Mar 2024 at 02:56.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
KeyError: 'cdns' this error caused by ip address, i used US vpn, the script worked well.
only one small confuse is that when i run the script, it said line 24 ')' not matched.
Code:v_m3u8 = f"{base_uri}/{manifest_uri.replace("index.m3u8", v_m3u8)}"
so i must change "index.m3u8" to 'index.m3u8' -
i had use the vpn,but it still does‘t work
HTTPError: 403 Client Error: Forbidden for url: https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId...3&is_dvr=false the error code still continue may be i need change vpn -
give windscribe a try, need register a free account, and 10GB band/month, totally enough for make video test. or urbanvpn.
-
-
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
I think I have found the problem Is caused by network problems to 403 because I try to use the curl https://www.nba.com/watch/video/2016-dunk-contest-lavine-vs-gordon-best-ever No response site at all Maybe I need a vps
Similar Threads
-
Can't decrypt widevine key
By Nethsara Devinda in forum Video Streaming DownloadingReplies: 3Last Post: 24th Sep 2023, 07:47 -
how to get widevine key? (for win11)
By Bobs47 in forum Video Streaming DownloadingReplies: 10Last Post: 13th Aug 2023, 13:27 -
Sincerely request for NBA League Pass download games Widevine Key obtain
By tmactalk in forum Video Streaming DownloadingReplies: 1Last Post: 30th Sep 2022, 04:20 -
Widevine key help
By jhynpls in forum Video Streaming DownloadingReplies: 11Last Post: 28th Jul 2022, 14:56 -
Widevine key not found
By DANNY14596 in forum Video Streaming DownloadingReplies: 15Last Post: 3rd Jun 2021, 23:54