VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Hi,
    can someone help me to download this episode from this free service
    https://www.aloula.sa/episode/24394
    it seems mpd or m3u8 link protected and played only inside player
    Quote Quote  
  2. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Code:
    N_m3u8DL-RE.exe "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1963012-IXtGQ7IMo833C39.smil/manifest.mpd" --header "Origin: https://www.aloula.sa" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  3. MPD:
    Code:
    https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1963012-IXtGQ7IMo833C39.smil/manifest.mpd
    Key:
    Code:
    53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Apparently they have both DRM videos and non-DRM. Very few DRM ones though. Only L3 cdm needed (wvd).

    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"
    
    PLAYER_URL = 'https://aloula.faulio.com/api/v1/video/{video_id}/player'
    ORIGIN = "https://www.aloula.sa"
    
    
    def get_keys(pssh_value, license_url):
        if pssh_value is None:
            return []
        try:
            device = Device.load(WVD_FILE)
        except:
            return []
    
        pssh_value = PSSH(pssh_value)
        cdm = Cdm.from_device(device)
        cdm_session_id = cdm.open()
    
        challenge = cdm.get_license_challenge(cdm_session_id, pssh_value)
        licence = requests.post(
            license_url, data=challenge,
            headers={"Origin": ORIGIN}
        )
        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_video_data(source_url):
        video_id = re.search(r"/episode/([^/]+)", source_url).group(1)
        response = json.loads(requests.get(
            PLAYER_URL.format(video_id=video_id),
            headers={'Origin': ORIGIN}
        ).content.decode())["settings"]
        manifest = response["protocols"]["dash"]
    
        try:
            license_url = response["drm"]["license"]
    
            pssh_value = str(min(re.findall(
                r'<cenc:pssh\b[^>]*>(.*?)</cenc:pssh>',
                requests.get(manifest, headers={"Origin": ORIGIN}).content.decode()
            ), key=len))
        except:
            return manifest, None, None
        return manifest, pssh_value, license_url
    
    
    def get_download_command(source_url):
        manifest, pssh, license_url = get_video_data(source_url)
        keys = get_keys(pssh, license_url)
    
        if len(keys) == 0:
            if pssh is not None:
                return f"Need local CDM (in WVD format) for {source_url}"
            return f'N_m3u8DL-RE.exe --header "Origin: {ORIGIN}" "{manifest}" -M format=mkv'
        return f'N_m3u8DL-RE.exe --header "Origin: {ORIGIN}" "{manifest}" {" ".join([f"--key {k}" for k in keys])} -M format=mkv'
    
    
    SOURCE_URLS = [
        "https://www.aloula.sa/episode/23779",
        "https://www.aloula.sa/episode/24394",
        "https://www.aloula.sa/episode/24320",
        "https://www.aloula.sa/episode/24387",
        "https://www.aloula.sa/episode/11164",
    ]
    
    for s in SOURCE_URLS:
        print(get_download_command(s))
    Output:
    Code:
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1946278-3E0NX4Q88B80j9E.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1963012-IXtGQ7IMo833C39.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1960655-3I1R0zT99F912dI.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/smil:itwfcdn/sba/1962894-ixS672i773OTCQ4.smil/manifest.mpd" -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/smil:itwfcdn/sba/1365075-0PKyH1a55M6LT6P.smil/manifest.mpd" -M format=mkv
    I don't know if there are free videos that require an account. Haven't seen any.

    Edit: Are they actually using the same key for an entire season?

    Edit 2: 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:23.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Apparently they have both DRM videos and non-DRM. Very few DRM ones though. Only L3 cdm needed (wvd).

    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"
    
    PLAYER_URL = 'https://aloula.faulio.com/api/v1/video/{video_id}/player'
    ORIGIN = "https://www.aloula.sa"
    
    
    def get_keys(pssh_value, license_url):
        if pssh_value is None:
            return []
        try:
            device = Device.load(WVD_FILE)
        except:
            return []
    
        pssh_value = PSSH(pssh_value)
        cdm = Cdm.from_device(device)
        cdm_session_id = cdm.open()
    
        challenge = cdm.get_license_challenge(cdm_session_id, pssh_value)
        licence = requests.post(
            license_url, data=challenge,
            headers={"Origin": ORIGIN}
        )
        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_video_data(source_url):
        video_id = re.search(r"/episode/([^/]+)", source_url).group(1)
        response = json.loads(requests.get(
            PLAYER_URL.format(video_id=video_id),
            headers={'Origin': ORIGIN}
        ).content.decode())["settings"]
        manifest = response["protocols"]["dash"]
    
        try:
            license_url = response["drm"]["license"]
    
            pssh_value = str(min(re.findall(
                r'<cenc:pssh\b[^>]*>(.*?)</cenc:pssh>',
                requests.get(manifest, headers={"Origin": ORIGIN}).content.decode()
            ), key=len))
        except:
            return manifest, None, None
        return manifest, pssh_value, license_url
    
    
    def get_download_command(source_url):
        manifest, pssh, license_url = get_video_data(source_url)
        keys = get_keys(pssh, license_url)
    
        if len(keys) == 0:
            if pssh is not None:
                return f"Need local CDM (in WVD format) for {source_url}"
            return f'N_m3u8DL-RE.exe --header "Origin: {ORIGIN}" "{manifest}" -M format=mkv'
        return f'N_m3u8DL-RE.exe --header "Origin: {ORIGIN}" "{manifest}" {" ".join([f"--key {k}" for k in keys])} -M format=mkv'
    
    
    SOURCE_URLS = [
        "https://www.aloula.sa/episode/23779",
        "https://www.aloula.sa/episode/24394",
        "https://www.aloula.sa/episode/24320",
        "https://www.aloula.sa/episode/24387",
        "https://www.aloula.sa/episode/11164",
    ]
    
    for s in SOURCE_URLS:
        print(get_download_command(s))
    Output:
    Code:
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1946278-3E0NX4Q88B80j9E.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1963012-IXtGQ7IMo833C39.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/drm/smil:itwfcdn/sba/1960655-3I1R0zT99F912dI.smil/manifest.mpd" --key 53d16cbbec94de3ffd397ccb92f12267:a699c4b3d9355f876e60fdbf325a909d -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/smil:itwfcdn/sba/1962894-ixS672i773OTCQ4.smil/manifest.mpd" -M format=mkv
    N_m3u8DL-RE.exe --header "Origin: https://www.aloula.sa" "https://clvod.itworkscdn.net/sbavod/smil:itwfcdn/sba/1365075-0PKyH1a55M6LT6P.smil/manifest.mpd" -M format=mkv
    I don't know if there are free videos that require an account. Haven't seen any.

    Edit: Are they actually using the same key for an entire season?
    Thank you so much bro. i really apreciate your help, your time and your great job done.
    Thanks to you all for awsome help.
    Quote Quote  



Similar Threads

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