VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 31 to 60 of 62
  1. yes, agree python version issue, i now use 3.11.7
    Quote Quote  
  2. Originally Posted by shellcmd View Post
    yes, agree python version issue, i now use 3.11.7
    Broke for me too on 3.10.8.
    Quote Quote  
  3. Originally Posted by jay_670 View Post
    Originally Posted by jay_670 View Post
    Originally Posted by shellcmd View Post
    give windscribe a try, need register a free account, and 10GB band/month, totally enough for make video test. or urbanvpn.
    I seem to have found that the problem is that my proxy software does not support cmd command Windows and I may still use a regular vpn to get the US ip
    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
    are you serious? to buy a vps?
    Quote Quote  
  4. Originally Posted by white_snake View Post
    Originally Posted by shellcmd View Post
    yes, agree python version issue, i now use 3.11.7
    Broke for me too on 3.10.8.

    so that is python 3.12 new feature? dont know pepe's python version.
    Quote Quote  
  5. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by shellcmd View Post
    so that is python 3.12 new feature? dont know pepe's python version.
    3.12.2
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  6. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    I modified the nba download script to not need anymore external cookies. Works directly with email/password now.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  7. Hello, good afternoon to everyone on the forum, it's a great pleasure to be part of this knowledge here
    I'm having a lot of trouble getting the video keys
    I've been trying to run None of this worked for me here, everything gives errors I've never seen anything like it, for several hours now and every time a different error appears, I would like to know If anyone could help me?
    Quote Quote  
  8. Pssh:AAAAenBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFoIA RIQjTmk917NQSndghu9MKWfQhoMbWVkaWFraW5kbmJhIjROQkF fMjAyMzEwMThfbmJhX2FwcF9wZXJndW50YXMtMTE5NTI1N19Ka XRwX1JlYWNoX0hEMgA=
    https://nbalpng.akamaized.net/vod/hls-wvpr/NBA_20231018_nba_app_perguntas-1195257/index.m3u8
    https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId...e&is_dvr=false
    Authorizationtoken:AuthToken1pVFdb9QwEPw1l7ec_B37I Q-hlF6pSoVoqcSbPzY5q0kc2U6vx6_HLVeQECAkLGs9Ws-ORjvd6jzMFtp9zkva0G5D3pUbYTz6eVh0zMftEoPT29nobX6kd gyr29owFVZ1mdIK8ZfZlNNfRp65P6l2D5NO26dpTEEv2xCH0j2 kUghCvDwvxTuYs8_HAu2o_fT8P-sJ2jXVVhkM4EgtG6NqZjmtNeey5k4ZIYBy0tvqFmY950vXOuj1 OubqLTx6C6XxEEJifB7qPARV89Hw2sdhrc2wX8Tghr1F7sS-PS7QXoZ0q80IuerGMRzAvUqnH9p3CWJR_ldvnbVhfTGnjekRiL 5hkmEBVlNlmwaMExgsM4ojCo0EY7XppdYINFPa9sCoc8Lwvvh8 cXAy8N9yv41q8jaGFPp8CvQ1LPkclvhDWDGM0KbVJBu9gVh1a9 6H6L_q7MN8rdNDi7nCjDLKBceY4oZwJlVDCMWKIaEkEUJKSjDj SkjCOeaYCMUlUlJwRDChilCGMC2YN4QRybEoQFbnT4uPkG7mFj eYU8aRwNVZBJ3BfW8W7XJwdQXHi9WXxUmhmRS2xsiKmrEe11rQ EqAiZU9lN4zYanfdnX3adYSL9iJ9uF7683le1vc3Bqe7wxTp02 fyRSE4UP9x3JD-zdWGmPsClt19t6HuGw
    Azukiimc:IMC7.2.0_AN_D3.0.0_S0
    Deviceprofile:eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNp b24iOiIxMCIsInZlbmRvck5hbWUiOiJNaWNyb3NvZnQiLCJvc0 5hbWUiOiJIVE1MNSIsInd2TGV2ZWwiOiJMMyIsImRldmljZVVV SUQiOiIxOGI0Yjc4YzdjZjA0NTkzYjEyMTFkZDI1MDc5OTQzNS J9
    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

    I have all the video data including KID KEY:--Key:8d39a4f75ecd4129dd821bbd30a59f42 I managed to convert phss em base x64 hex by extracting it
    0000007a7073736800000000
    edef8ba979d64acea3c827dcd51d21ed
    0000005a08011210
    "\\\\\"8d39a4f75ecd4129dd821bbd30a59f42"/////"
    1a0c6d656469616b696e646e626122344e42415f3230323331 3031385f6e62615f6170705f70657267756e7461732d313139 353235375f4a6974705f52656163685f48443200
    Quote Quote  
  9. @braquino21 provide the video page url.
    Quote Quote  
  10. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    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}"
        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))
    Output:
    Code:
    N_m3u8DL-RE.exe https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_202403110042NBA_____VIDEOS__NBAE_2730310/index.m3u8?addUserInfo=1 --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 --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 --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 --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 --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 --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 --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 --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 --key b7866579c32ff24d52882fe194a2ac99:f9fe7b15d02deca76749b80963e68252 -M format=mkv
    Their login functionality was implemented in a good way, which was a nice thing to see. The easy solution was to simply use the browser cookies to skip that. So if you want free videos that need a free account to watch, make one and log in using the Firefox browser (and make sure the browser cookies don't get deleted).

    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.
    Hello I have tried to get this script to work but it gives this error:
    in get_pssh_info
    v_m3u8 = re.findall(r'^v.*?\.m3u8\?.*?$', requests.get(manifest).content.decode(), re.MULTILINE)[-1]
    IndexError: list index out of range

    I manually retrieved the pssh and I was able to get the key and download but I want the script to not fail.
    Last edited by totis; 16th Apr 2024 at 10:57.
    Quote Quote  
  11. Image
    [Attachment 78426 - Click to enlarge]

    I have already emulated an Android device, I have already connected the server frida and I already rode dumper-main , however, I was unable to extract the device_client_id_blob and device_private_key files from the computer, they do not appear anywhere on the PC every time there is a different error
    Quote Quote  
  12. Image
    [Attachment 78427 - Click to enlarge]

    it feels like i'm going around in a circle i can't just get this last key in the video
    Quote Quote  
  13. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Code:
    N_m3u8DL-RE.exe "https://nbalpng.akamaized.net/vod-pz/a/hls-wvpr/NBA_20231018_nba_app_perguntas-1195257/index.m3u8?addUserInfo=1&sessionId=sessionId" --key 8d39a4f75ecd4129dd821bbd30a59f42:de364968b3d996c4af2681e8c3098fd9 -M format=mkv
    Edit: the downloader script got updated, it should work now.
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 16th Apr 2024 at 11:01.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  14. Originally Posted by braquino21 View Post
    Image
    [Attachment 78426 - Click to enlarge]

    I have already emulated an Android device, I have already connected the server frida and I already rode dumper-main , however, I was unable to extract the device_client_id_blob and device_private_key files from the computer, they do not appear anywhere on the PC every time there is a different error
    Try to dump them with KeyDive: https://github.com/hyugogirubato/KeyDive/releases
    And no, there's no way to get the KEY part of the kid:key pair without making a license request, so you either need an L3 script with your CDM or an online service like cdrm-project (unless, if you're lucky, you find the key already cached in cdrm-project-like sites).

    Btw as Pepe said, use his updated script or if you want to go the manual way for some reason, here's what you need:

    PSSH:
    Code:
    AAAAenBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFoIARIQjTmk917NQSndghu9MKWfQhoMbWVkaWFraW5kbmJhIjROQkFfMjAyMzEwMThfbmJhX2FwcF9wZXJndW50YXMtMTE5NTI1N19KaXRwX1JlYWNoX0hEMgA=
    License url:
    Code:
    https://ottapp-appgw-amp.nba.com/v1/client/get-widevine-license?ownerUid=azuki&mediaId=NBA_20231018_nba_app_perguntas-1195257_Jitp_Reach_HD&sessionId=<your_session_id>&is_dvr=false
    Headers:
    Code:
    headers = {
        'AuthorizationToken': 'AuthToken1fZDL.....',
        'AzukiIMC': 'IMC7.2.0_AN_D3.0.0_S0',
        'DeviceProfile': 'eyJtb....',
    }
    That's all.
    Quote Quote  
  15. #####de364968b3d996c4af2681e8c3098fd9#####Dude, this is really impressive, it seems like witchcraft, there must be some final part of the process going wrong, I can't understand.
    This video was just a random one that I took to study key issues without any kind of programming
    It really is this video key, it worked amazingly, as I would have liked, I got my own keys, I spent night and night looking for this code, analyzing each browser script, I never got even close to it.
    Quote Quote  
  16. With all the humility in the world, could you teach me?
    sample What is DRM itself, how do you do it or where does it matter, whether there is a way to do it or not, How can I actually make the files evice_client_id_blob e device_private_key If you really need them or not? what would be file WVD_FILE = "./device_wvd_file.wvd" I believe I'm making a mistake by not understanding what each file means
    Quote Quote  
  17. I installed package KeyDive I reconnected everything again and it still gives me an error
    Quote Quote  
  18. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by braquino21 View Post
    what would be file WVD_FILE...
    The WVD_FILE is the local path to your cdm in wvd format. What are even these words and how to get one / convert one => read the sticky threads.
    After getting one and setting the path, you set your account credentials as well. The email / password in the 2 variables at the start of the script.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  19. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by braquino21 View Post
    will not
    You aren't using the updated version. It won't magically edit itself unless you take the latest version.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  20. Image
    [Attachment 78432 - Click to enlarge]

    @2nHxWW6GkN1l916N3ayz8HQoi done, this was very easy but I don't have my own files I even tried to make them I emulated everything, virtual android cell phone, server "FRIDA" I executed "dump_keys" and in the program "ANDROID STUDIO" I accessed "https://bitmovin.com/demos/drm" play video phone virtual but I searched with the computer all morning I couldn't find the directory of the files
    Quote Quote  
  21. however I am using two files that came within WKS-KEYS google_android_sdk_built_for_x86_v4.1.0-android_b055e439_4464_l3.wvd?
    Quote Quote  
  22. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by braquino21 View Post
    however I am using two files that came within WKS-KEYS google_android_sdk_built_for_x86_v4.1.0-android_b055e439_4464_l3.wvd?
    I dunno wks-keys so I can't assist you. I did encounter this issue once though with someone else. The wvd generated from a cdm from wks-keys couldn't be used at all but the one you dumped on your own, it could. So I recommend getting your own one. If you can't get one, stick to manual.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  23. @2nHxWW6GkN1l916N3ayz8HQoi Image
    [Attachment 78433 - Click to enlarge]
    these errors be related to the WKS-KEYS CDR? Is this how I can get my own CDR to generate keys?
    Quote Quote  
  24. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by braquino21 View Post
    these errors be related to the WKS-KEYS CDR?
    I don't know what they're related to or what is their cause. What I do know is that after I switched the wvd with something I dumped on my own, it worked.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  25. I would like to thank everyone here in the group again for their attention and all their help, after brainstorming I managed to generate my own device_client_id_blob and device_private_key files and then I just had to do the conversion to device_wvd_file.wvd format and put them inside the root of pywidevine-master on the first attempt I was rewarded with the my first two keys " but soon after the third attempt the next error occurredImage
    [Attachment 78472 - Click to enlarge]
    Quote Quote  
  26. 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_g0052300111atl1 000436chiV_Jitp_Reach_HD&sessionId=5d18f7a5-2f2f-4eaf-bd13-f482db597f0a&is_dvr=false"
    PSSH_VALUE = "AAAAcXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAFEIARIQe LHV1fdkvQXBWDnVam+HahoMbWVkaWFraW5kbmJhIitOQkFfZzA wNTIzMDAxMTFhdGwxMDAwNDQ1Y2hpVl9KaXRwX1JlYWNoX0hEM gA="
    WVD_FILE = "./device_wvd_file.wvd"

    LICENSE_HEADERS = {
    "AuthorizationToken": "AuthToken1pVFdb9QwEPw1l7ec_B37IQ-hlF6pSoVoqcSbPzY5q0kc2U6vx6_HLVeQECAkLGs9Ws-ORjvd6jzMFtp9zkva0G5D3pUbYTz6eVh0zMftEoPT29nobX6kd gyr29owFVZ1mdIK8ZfZlNNfRp65P6l2D5NO26dpTEEv2xCH0j2 kUghCvDwvxTuYs8_HAu2o_fT8P-sJ2jXVVhkM4EgtG6NqZjmtNeey5k4ZIYBy0tvqFmY950vXOuj1 OubqLTx6C6XxEEJifB7qPARV89Hw2sdhrc2wX8Tghr1F7sS-PS7QXoZ0q80IuerGMRzAvUqnH9p3CWJR_ldvnbVhfTGnjekRiL 5hkmEBVlNlmwaMExgsM4ojCo0EY7XppdYINFPa9sCoc8Lwvvh8 cXAy8N9yv41q8jaGFPp8CvQ1LPkclvhDWDGM0KbVJBu9gVh1a9 6H6L_q7MN8rdNDi7nCjDLKBceY4oZwJlVDCMWKIaEkEUJKSjDj SkjCOeaYCMUlUlJwRDChilCGMC2YN4QRybEoQFbnT4uPkG7mFj eYU8aRwNVZBJ3BfW8W7XJwdQXHi9WXxUmhmRS2xsiKmrEe11rQ EqAiZU9lN4zYanfdnX3adYSL9iJ9uF7683le1vc3Bqe7wxTp02 fyRSE4UP9x3JD-zdWGmPsClt19t6HuGw",
    "AzukiIMC": "IMC7.2.0_AN_D3.0.0_S0",
    "DeviceProfile": "eyJtb2RlbCI6IkRlc2t0b3AiLCJvc1ZlcnNpb24iOiIxMCIsI nZlbmRvck5hbWUiOiJNaWNyb3NvZnQiLCJvc05hbWUiOiJIVE1 MNSIsInd2TGV2ZWwiOiJMMyIsImRldmljZVVVSUQiOiIxOGI0Y jc4YzdjZjA0NTkzYjEyMTFkZDI1MDc5OTQzNSJ9"
    }

    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)
    Quote Quote  
  27. This morning I tried again "it only generated two more keys and started showing the same error again
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!