VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date
    Jul 2023
    Location
    Romania
    Search PM
    Hello !
    I want to request your help for downloading this video episode content from ZEE5 which contain DRM!
    [url]https://zee5vod.akamaized.net/drm1/elemental/dash/TV_SHOWS/ZEE_TV/REV3_Pavitra_Rishta_Ep_1189_Episode_hi_6358aef56e6 cde69f22851803330bec9/manifest-phone.mpd?c3.ri=6894835270985943849
    Unfortunately I has tried all methods but i doesn't work for me and I really need of this video at 1080p quality !
    Can you please help me to can have this video ? 🙏
    Is very important for me !
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    What is the link to the video? Not the mpd.
    Quote Quote  
  3. If you want the 1080p stream, first of all you should remove the "-phone" part from the url and have:
    Code:
    https://zee5vod.akamaized.net/drm1/elemental/dash/TV_SHOWS/ZEE_TV/REV3_Pavitra_Rishta_Ep_1189_Episode_hi_6358aef56e6cde69f22851803330bec9/manifest.mpd?c3.ri=6894835270985943849
    But stream is encrypted so as Baldrick already said you need to provide the video page url for us to get to the decryption keys.
    Quote Quote  
  4. Code:
    17dd4a2329c74a04a11f01d162a474ad:901d3b802d1d5aea0b19fe6ca9f66816
    Edit:

    PSSH:
    Code:
    AAAAV3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADcIARIQF91KIynHSgShHwHRYqR0rRoLYnV5ZHJta2V5b3MiEBfdSiMpx0oEoR8B0WKkdK0qAkhE
    License url:
    Code:
    https://spapi.zee5.com/widevine/getLicense
    Headers:
    Code:
    Customdata: Nagra_d55f0d06645d4380963dcda3de56e7c5
    Nl: d55f0d06645d4380963dcda3de56e7c5
    Download:
    Code:
    N_m3u8DL-RE -M format=mkv --key 17dd4a2329c74a04a11f01d162a474ad:901d3b802d1d5aea0b19fe6ca9f66816 https://zee5vod.akamaized.net/drm1/elemental/dash/TV_SHOWS/ZEE_TV/REV3_Pavitra_Rishta_Ep_1189_Episode_hi_6358aef56e6cde69f22851803330bec9/manifest.mpd?c3.ri=6894835270985943849
    Quote Quote  
  5. Member
    Join Date
    Jul 2023
    Location
    Romania
    Search PM
    Originally Posted by white_snake View Post
    Code:
    17dd4a2329c74a04a11f01d162a474ad:901d3b802d1d5aea0b19fe6ca9f66816
    edit:

    Pssh:
    Code:
    aaaav3bzc2gaaaaa7e+lqxnwss6jycfc1r0h7qaaadciariqf91kiynhsgshhwhryqr0rrolynv5zhjta2v5b3miebfdsimpx0oeor8b0wkkdk0qakhe
    license url:
    Code:
    https://spapi.zee5.com/widevine/getlicense
    headers:
    Code:
    customdata: Nagra_d55f0d06645d4380963dcda3de56e7c5
    nl: D55f0d06645d4380963dcda3de56e7c5
    download:
    Code:
    n_m3u8dl-re -m format=mkv --key 17dd4a2329c74a04a11f01d162a474ad:901d3b802d1d5aea0b19fe6ca9f66816 https://zee5vod.akamaized.net/drm1/elemental/dash/tv_shows/zee_tv/rev3_pavitra_rishta_ep_1189_episode_hi_6358aef56e6cde69f22851803330bec9/manifest.mpd?c3.ri=6894835270985943849
    doesn't work for downloading the video 😕
    can you please help me ?
    Quote Quote  
  6. Originally Posted by ovidiu900 View Post
    doesn't work for downloading the video 😕
    can you please help me ?
    It's funny cause I'm using the same .mpd that you yourself provided. I uploaded your video here: https://gofile.io/d/HMufQ4
    Quote Quote  
  7. Member
    Join Date
    Jul 2023
    Location
    Romania
    Search PM
    Thank you very much ! 😊
    It doesn't work on my Android Device of this reason and i don't have PC !
    Quote Quote  
  8. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Here is the downloader for https://www.zee5.com . It works only on free videos. I haven't seen free videos that require an account.

    Code:
    import json
    import re
    
    import pycountry
    import requests
    from pywidevine.cdm import Cdm
    from pywidevine.device import Device
    from pywidevine.pssh import PSSH
    
    WVD_FILE = "./device_wvd_file.wvd"
    
    CONTENT_URL = 'https://spapi.zee5.com/singlePlayback/getDetails/secure?content_id={content_id}&show_id={show_id}&device_id=device_id&platform_name=desktop_web&country={country_code}&check_parental_control=false'
    LICENSE_URL = "https://spapi.zee5.com/widevine/getLicense"
    COUNTRY_CODES = [c.alpha_2 for c in pycountry.countries]
    
    
    def get_access_token(source_url):
        for s in ['"platform_token":{"token":', '"platformToken":']:
            try:
                return re.search(
                    rf'{s}"(.*?)"',
                    requests.get(source_url).content.decode()
                ).group(1)
            except:
                pass
        return None
    
    
    def get_video_data(source_url):
        if "/cricket/" in source_url:
            print("Url not supported: ", source_url)
            exit(0)
        access_token = get_access_token(source_url)
    
        if "/movies/" in source_url:
            show_id = None
            content_id = re.search(r'/details/[^/]+/([^/]+)', source_url).group(1)
            content_url = CONTENT_URL.replace("&show_id={show_id}", "")
        else:
            show_id = re.search(r'/details/[^/]+/([^/]+)/', source_url).group(1)
    
            if "latest" in source_url.split("/")[-1]:
                content_id = show_id
                content_url = CONTENT_URL.replace("&show_id={show_id}", "&is_latest=1")
            else:
                content_id = re.search(r'/details/[^/]+/[^/]+/[^/]+/([^/]+)$', source_url).group(1)
                content_url = CONTENT_URL
    
        manifest, response = None, None
        for country_code in COUNTRY_CODES:
            try:
                response = json.loads(requests.post(
                    content_url.format(content_id=content_id, show_id=show_id, country_code=country_code),
                    json={
                        'x-access-token': access_token,
                        'X-Z5-Guest-Token': '00000000-0000-0000-0000-00000000'
                    }
                ).content.decode())
    
                manifest = None
                for details in response:
                    try:
                        manifest = response[details]["video_url"]["mpd"]
                    except:
                        pass
                manifest = manifest.replace("-phone.mpd", ".mpd").split("?")[0]
                break
            except:
                pass
    
        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, {
            "nl": response["keyOsDetails"]["nl"],
            "customdata": response["keyOsDetails"]["sdrm"]
        }
    
    
    def get_keys(pssh_value, additional):
        if pssh_value 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={
                'nl': additional["nl"],
                'customdata': additional["customdata"],
            }
        )
        licence.raise_for_status()
    
        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, additional = get_video_data(source_url)
        keys = get_keys(pssh_value, additional)
    
        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 = [
        "https://www.zee5.com/global/tv-shows/details/pyar-ka-pehla-naam-radha-mohan/0-6-4z5130241/latest",
        "https://www.zee5.com/global/tv-shows/details/navri-mile-hitlerla/0-6-4z5521328/latest",
        "https://www.zee5.com/global/tv-shows/details/pavitra-rishta/0-6-133/episode-1189-pavitra-rishta/0-1-manual_1ej5qfm3eg8g",
        "https://www.zee5.com/global/tv-shows/details/veera/0-6-4z5521331/ramachandran-disbelieves-raghavan/0-1-6z5536732",
        "https://www.zee5.com/global/web-series/details/maya-bazaar-for-sale/0-6-4z5387149/who-let-the-cow-out/0-1-6z5395324",
        "https://www.zee5.com/global/web-series/details/united-kacche/0-6-4z5327133/pehli-job-dusra-pyaar/0-1-6z5335305",
        "https://www.zee5.com/global/movies/details/the-long-drive/0-0-1z520799",
        "https://www.zee5.com/global/movies/details/kaagaz/0-0-1z536625",
    ]
    
    for s in SOURCE_URLS:
        print(get_download_command(s))
    Output:
    Code:
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/titanfile/dash/TV_SHOWS/ZEE_TV/March2024/27032024/Episode/CS_Pyar_Ka_Pehla_Naam_Radha_Mohan_Ep683_Episode_27032024_hi_f63ffd3984da63fd926f37aa2767f8c8/manifest.mpd" --key 7dc6efe7413234d48d9e333d22b003cf:b1206b88ab821ecfd8ad7fc658cd16bf -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/titanfile/dash/TV_SHOWS/ZEE_MARATHI/March2024/27032024/Episode/Navri_Mile_Hitlerla_Ep10_Episode_27032024_mr_91a3dde69d75cad0a880c1aa9b28bf87/manifest.mpd" --key f4894e9f315b359c8cf904a3079900f8:66314c52e42102a91665e746df8672a5 -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/elemental/dash/TV_SHOWS/ZEE_TV/REV3_Pavitra_Rishta_Ep_1189_Episode_hi_6358aef56e6cde69f22851803330bec9/manifest.mpd" --key 17dd4a2329c74a04a11f01d162a474ad:901d3b802d1d5aea0b19fe6ca9f66816 -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/titanfile/dash/TV_SHOWS/ZEE_TAMIL/March2024/27032024/Episode/Veera_Ep23_Episode_27032024_ta_b71c599b8eea62aadecc5bcd54ebc444/manifest.mpd" --key 7c4b8cda9f02329dbb68f825d88a0a11:647bf26782d1b6d8d4efcbdd19b9bf77 -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/elemental/dash/MOVIES/MULTI_AUDIO/Global_Promos/JULY/14/REV_MAYA_BAZAAR_FOR_SALE_TRAILER_SN_te_302a1e2ef7e9869e599120cb9092fcae/manifest.mpd" --key 1555614ec20b4bb180927d610119df90:69a12a9228b42c33cbc6aecf45fffac4 -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/elemental/dash/TRAILERS/GLOBAL/PROMOS/HINDI/2023/MARCH/23032023/UNITED_KACCHE_TRAILER_SN_50PER_hI_726aa14219bb75be589a4d8149c82d86/manifest.mpd" --key e93858fc923641ac9c0b158ec8ca7ceb:d03c03f5bf8097f3758553a606fc03bc -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/elemental/dash/Movies/Drama/LONG_DRIVE__ENGLISH_SHORT_FILM_Rev2RTR_en_bc0eb0dea71a1c985cfcb3801e947b2a/manifest.mpd" --key 5e773e33d0b24010a1c6b21e91aa8d4d:043b4394c3e3e2d370136b9243975a95 -M format=mkv
    N_m3u8DL-RE.exe "https://zee5vod.akamaized.net/drm1/elemental/dash/Trailers/KAAGAZ_TRAILER_30122020_SN_APME_RTR_hi_c79620526b6b6872a7320ce757c765ea/manifest.mpd" --key 22b06a8249e64b23ac9fa0e8facd0fe3:213b7e2b695bef47a024c0ee81bbf6a2 -M format=mkv
    It works for videos from: TV Shows, Movies, Web Series. The Cricket section doesn't even use DRM but instead, some kind of broken m3u8, and the video rarely works even in the browser, so I skipped that section. Credit goes to @snake for explaining the phone.mpd trick.
    Quote Quote  
  9. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Here is the downloader for https://www.zee5.com . It works only on free videos. I haven't seen free videos that require an account.

    It works for videos from: TV Shows, Movies, Web Series. The Cricket section doesn't even use DRM but instead, some kind of broken m3u8, and the video rarely works even in the browser, so I skipped that section. Credit goes to @snake for explaining the phone.mpd trick.
    Well done mate.
    Quote Quote  
  10. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Here is the downloader for https://www.zee5.com . It works only on free videos. I haven't seen free videos that require an account.

    It works for videos from: TV Shows, Movies, Web Series. The Cricket section doesn't even use DRM but instead, some kind of broken m3u8, and the video rarely works even in the browser, so I skipped that section. Credit goes to @snake for explaining the phone.mpd trick.
    Thank you for the script man, it works really well and blazingly fast.


    There's one issue wit hthe script. For TV Shows URLs sometimes it gives the preview mpd as output instead of episode mpd.


    Kindly check it once.
    Quote Quote  
  11. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by Jelov View Post
    There's one issue wit hthe script. For TV Shows URLs sometimes it gives the preview mpd as output instead of episode mpd.
    Give 5 URLs with this problem. If it's very rare then give what you can but I would need at least 5 to understand the data structures. I write these scripts very fast and occasionally miss stuff like this.
    Quote Quote  
  12. Give 5 URLs with this problem. If it's very rare then give what you can but I would need at least 5 to understand the data structures. I write these scripts very fast and occasionally miss stuff like this.
    Very sorry for the late reply, after thoroughly reviewing the URLs I found that zee5 shows the latest TV Show episodes as preview if I don't have a premium subscription. Whereas one can watch the old episodes fully on a free account.


    Thus it is not the fault of your script. Thank you so much for making such robust script.
    Quote Quote  
  13. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by Jelov View Post
    Whereas one can watch the old episodes fully on a free account.
    So there is some specific old content that you can't watch fully for free unless you use a free account? Give 5 URLs and I'll handle that case. I don't care about the subscription ones (I won't ever make public scripts for paid content downloading) but I do want to handle all type of free content (with or without account).
    Quote Quote  
  14. So there is some specific old content that you can't watch fully for free unless you use a free account? Give 5 URLs and I'll handle that case. I don't care about the subscription ones (I won't ever make public scripts for paid content downloading) but I do want to handle all type of free content (with or without account).
    Haven't found any such content. If it is a free to watch content (old or new) then it can be wtached with or without an account on zee5.
    Quote Quote  



Similar Threads

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