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 2
FirstFirst 1 2
Results 31 to 37 of 37
  1. tv360, is it famous sigmadrm?
    Quote Quote  
  2. Originally Posted by linkinp View Post
    PSSH:
    Code:
    AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwSEKj0S9o2v0TQhsWzShm/QXMaD3RodWRvbXVsdGltZWRpYSIPQ1NNXzE1Mjc2MTQ5X1NECAFI49yVmwY=
    License URL:
    Code:
    https://sdrm.tv360.vn/license/verify/widevine
    Headers:
    Code:
    headers = {
        'Custom-Data': 'eyJ...'
    }
    In your basic L3 script change the line that parses the license to:
    Code:
    cdm.parse_license(session_id, json.loads(licence.content)['license'])
    Key:
    Code:
    --key a8f44bda36bf44d086c5b34a19bf4173:0f9f640d200913a8d34cd2ebb23c63ba
    Download:
    Code:
    N_m3u8DL-RE -M format=mkv --key a8f44bda36bf44d086c5b34a19bf4173:0f9f640d200913a8d34cd2ebb23c63ba https://vod-ali1.tv360.vn/video1/2023/10/23/16/4ebcd505/stream.mpd
    Quote Quote  
  3. Originally Posted by white_snake View Post
    Originally Posted by linkinp View Post
    PSSH:
    Code:
    AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwSEKj0S9o2v0TQhsWzShm/QXMaD3RodWRvbXVsdGltZWRpYSIPQ1NNXzE1Mjc2MTQ5X1NECAFI49yVmwY=
    License URL:
    Code:
    https://sdrm.tv360.vn/license/verify/widevine
    Headers:
    Code:
    headers = {
        'Custom-Data': 'eyJ...'
    }
    In your basic L3 script change the line that parses the license to:
    Code:
    cdm.parse_license(session_id, json.loads(licence.content)['license'])
    Key:
    Code:
    --key a8f44bda36bf44d086c5b34a19bf4173:0f9f640d200913a8d34cd2ebb23c63ba
    Download:
    Code:
    N_m3u8DL-RE -M format=mkv --key a8f44bda36bf44d086c5b34a19bf4173:0f9f640d200913a8d34cd2ebb23c63ba https://vod-ali1.tv360.vn/video1/2023/10/23/16/4ebcd505/stream.mpd
    Thank to white_snake, i tried many ways, but there are error "Could not parse license_message as a SignedMessage, Error parsing message" and "Forbidden for url: https://sdrm.tv360.vn/license/verify/widevine" Can you show me detail header code, please!
    Quote Quote  
  4. Originally Posted by welcom1985 View Post
    Thank to white_snake, i tried many ways, but there are error "Could not parse license_message as a SignedMessage, Error parsing message" and "Forbidden for url: https://sdrm.tv360.vn/license/verify/widevine" Can you show me detail header code, please!
    Of course you have to use your own fresh Custom-Data value, I truncated my own in the example.
    Quote Quote  
  5. Originally Posted by white_snake View Post
    Originally Posted by welcom1985 View Post
    Thank to white_snake, i tried many ways, but there are error "Could not parse license_message as a SignedMessage, Error parsing message" and "Forbidden for url: https://sdrm.tv360.vn/license/verify/widevine" Can you show me detail header code, please!
    Of course you have to use your own fresh Custom-Data value, I truncated my own in the example.
    In your headers, you used only 'Custom-Data': 'eyJ...' ? or somethings else?
    Quote Quote  
  6. Originally Posted by welcom1985 View Post
    Originally Posted by white_snake View Post
    Originally Posted by welcom1985 View Post
    Thank to white_snake, i tried many ways, but there are error "Could not parse license_message as a SignedMessage, Error parsing message" and "Forbidden for url: https://sdrm.tv360.vn/license/verify/widevine" Can you show me detail header code, please!
    Of course you have to use your own fresh Custom-Data value, I truncated my own in the example.
    In your headers, you used only 'Custom-Data': 'eyJ...' ? or somethings else?
    Only Custom-Data.
    Quote Quote  
  7. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    I dunno if it's been already done but here's a downloader for https://plus.rtl.de . Local cdm needed (please don't ask me how to get one, search the forum). It works only for free videos without geographic restrictions. Since only the license call needs a proper German IP, it should in theory be working as well for those with restrictions but I have no way of testing it. I skipped livestreams because I can't test those at all even in browser.

    Code:
    import json
    import re
    
    import requests
    from pywidevine.cdm import Cdm
    from pywidevine.device import Device
    from pywidevine.pssh import PSSH
    
    WVD_FILE = "device_wvd_file.wvd"
    
    GRAPHQL_URL = 'https://cdn.gateway.now-plus-prod.aws-cbc.cloud/graphql'
    TOKEN_URL = 'https://auth.rtl.de/auth/realms/rtlplus/protocol/openid-connect/token'
    BASE_URL = "https://plus.rtl.de"
    
    RES_PRIORITY = {"sd": 0, "hd": 1}
    
    
    def get_access_token():
        main_js = BASE_URL + "/" + re.search(
            r'src="(main.*?\.js)"', requests.get(BASE_URL).content.decode()
        ).group(1)
        client_secret = re.search(
            r'client_secret:"([^"]+)"', requests.get(main_js).content.decode()
        ).group(1)
    
        return json.loads(requests.post(
            TOKEN_URL, data={
                'grant_type': 'client_credentials',
                'client_id': 'anonymous-user',
                'client_secret': client_secret
            }
        ).content.decode())["access_token"]
    
    
    AUTH_TOKEN = get_access_token()
    
    
    def get_video_data(source_url):
        content_id = source_url.split("-")[-1].split("/")[0]
        content_type = "movie" if "/filme/" in source_url else "episode"
        response = next(iter(json.loads(requests.get(
            GRAPHQL_URL, headers={
                'rtlplus-client-Id': 'rci:rtlplus:web',
                'rtlplus-client-Version': 'rtlplus-client-Version',
                'Authorization': f'Bearer {AUTH_TOKEN}'
            }, params={
                'operationName': 'WatchPlayerConfigV3',
                'variables': json.dumps({
                    "platform": "WEB",
                    "id": f"rrn:watch:videohub:{content_type}:{content_id}"
                }), 'extensions': json.dumps({
                    "persistedQuery": {
                        "version": 1,
                        "sha256Hash": "dcb62f31f4d2cba96bc81144fb1b4dc2555b389cc11396e471c75a0c2ae27bea"
                    }
                })
            }
        ).content.decode())["data"].values()))["playoutVariants"]
    
        video_contents = []
        for variant in response:
            license_url = None
            for licence in variant["licenses"]:
                if "widevine" not in licence["type"].lower():
                    continue
                license_url = licence["licenseUrl"]
                break
            if license_url is None:
                continue
    
            manifest = None
            for source in variant["sources"]:
                if "main" not in source["priority"].lower():
                    continue
                if ".mpd" not in source["url"]:
                    continue
                manifest = source["url"]
                break
            if manifest is None:
                continue
    
            quality = variant["type"].lower().replace("dash", "")
            video_contents.append((manifest, license_url, quality))
    
        video_contents = sorted(video_contents, key=lambda vc: RES_PRIORITY[vc[2]], reverse=True)[0]
        manifest, license_url = video_contents[0:2]
        try:
            pssh_value = str(min(re.findall(
                r'<cenc:pssh\b[^>]*>(.*?)</cenc:pssh>',
                requests.get(manifest).content.decode()
            ), key=len))
        except:
            return manifest, None, None
        return manifest, pssh_value, license_url
    
    
    def get_keys(pssh_value, license_url):
        if pssh_value is None:
            return []
        try:
            device = Device.load(WVD_FILE)
        except:
            return []
    
        pssh = PSSH(pssh_value)
        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={'x-auth-token': AUTH_TOKEN}
        )
        try:
            licence.raise_for_status()
        except Exception as exc:
            response = exc.response
            if response.status_code == 403:
                response = response.content.decode()
                for m in ["proxy", "location"]:
                    if m in response:
                        print("VPN Failure. Need German IP.")
                        exit(0)
                if "free" in response:
                    print("Cannot download paid content.")
                    exit(0)
            raise exc
        keys = []
        cdm.parse_license(cdm_session_id, licence.content)
        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, license_url = get_video_data(source_url)
        keys = get_keys(pssh_value, license_url)
    
        if len(keys) == 0:
            if pssh_value is not None:
                return f"Need local CDM (in WVD format) for {source_url}"
            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 = [
        "https://plus.rtl.de/video-tv/serien/alles-was-zaehlt-146430/2024-4-993969/episode-4425-kilian-auf-erfolgskurs-927718",
        "https://plus.rtl.de/video-tv/serien/koeln-50667-1000002446/2024-4-1000226/episode-2838-eine-runde-nummer-1000193428",
        "https://plus.rtl.de/video-tv/serien/medicopter-117-jedes-leben-zaehlt-62735/staffel-4-101407/episode-11-lebendig-begraben-101418",
        "https://plus.rtl.de/video-tv/shows/die-geissens-eine-schrecklich-glamouroese-familie-1000002255/staffel-22-1900225522/episode-21-habemus-havarie-1000192267",
        "https://plus.rtl.de/video-tv/shows/hartz-rot-gold-armutskarte-deutschland-1000003445/staffel-4-999844/episode-2-weissenfels-2-1000191293",
        "https://plus.rtl.de/video-tv/shows/hilfe-die-camper-kommen-861468/2023-4-971471/episode-6-die-verbleibenden-paare-erreichen-ihr-ziel-in-spanien-861475",
        "https://plus.rtl.de/video-tv/filme/achtung-zollfahnder-jagd-auf-schmuggler-847038",
        "https://plus.rtl.de/video-tv/filme/soziale-brennpunkte-was-passiert-mit-unseren-staedten-844861",
        "https://plus.rtl.de/video-tv/filme/retouren-wahnsinn-die-dunkle-seite-des-onlinehandels-864611",
    ]
    
    for s in SOURCE_URLS:
        print(get_download_command(s))
    Output:
    Code:
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/streaming/watch/927718/6-4000-1-1-1.ism/rtlplus.mpd" --key 0ba9f491556284d9422d402d8021c34e:14dbe4a2c779aa6e4877d75961fd03bc -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/cves/sd/rtlplus/1000193428/3-1-1-3-2.ism/v1.mpd" --key 93db5944e7f90e11a32a173c8a2b6d06:07ccc53332089ad29bfd881a78783624 -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-cf.tvnow.de/p112/cves/sd/rtlplus/101418/1-1-1-3-2.ism/v1.mpd" --key cac7c4136677373c6a4157b61269d046:85bf8c91ac92bee8dca84292dcca5d28 -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/cves/sd/rtlplus/1000192267/2-1-1-3-2.ism/v1.mpd" --key caad17b571768d0431efa298ae6fffac:1adb3dde59b576aeb414067da55a5c7f -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/cves/sd/rtlplus/1000191293/2-1-1-3-2.ism/v1.mpd" --key e48f3d99d943336a2519ed2f92545509:88a9fa64b85e9f7e96cc1767822ace96 -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/streaming/watch/861475/25-4000-1-1-1.ism/rtlplus.mpd" --key 45ede0a5d34a0bd5731497a4cd3ba546:57e0de2d2dc2e0ffcaac1c5985000706 -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-cf.tvnow.de/p112/cves/sd/rtlplus/847038/1-1-1-3-2.ism/v1.mpd" --key 404a2e9b44debe4179fd5a886ae461dd:3bdcdffda3a2cac03b4083696ed744dd -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/streaming/watch/844861/16-4000-1-1-1.ism/rtlplus.mpd" --key 89c009d55eb88231e7ca70075eabf471:c9a0b74bc8d6e96823bbb30b8e8c8f46 -M format=mkv
    N_m3u8DL-RE.exe "https://vodnowusoawsdash-a.akamaihd.net/p112/cves/sd/rtlplus/864611/2-1-1-3-2.ism/v1.mpd" --key ff985eccd971ca70e6b1044fc93fa958:96d43984df3407644a3fb579cde0cf56 -M format=mkv
    Some content may be deleted from their site so make sure you can actually watch what you attempt to download. I haven't found any secret mpd for higher resolutions (720p+) using their web api unfortunately.

    Edit: 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:26.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  



Similar Threads

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