VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. For almost two weeks, I have trying to download from PTVflix.org using N_m3u8DL-RE. I have tried everything but I couldn't manage to get it to work. But that's only the first part of the problem. The second part is that even if it did, I would still have to get another program running to generate decryption keys since the content on the site is DRM protected.

    I also tried hiring a python developer to help me download the videos from ptvflix but that too ended badly and couldn't yield the desired results.

    I was wondering if someone here would be open to helping me download videos from the website.

    This would be a life saver, really.
    Quote Quote  
  2. Gosh I'm so frustrated at this point that I even messed up the program name.
    Quote Quote  
  3. Which video do you want to download from PTVFLIX?
    Quote Quote  
  4. Originally Posted by Secranes View Post
    Which video do you want to download from PTVFLIX?
    Hey brother!
    The problem is that I need to download like 100 videos over the next 4 weeks. Like 10-15 videos a week.
    If it were a single one, there are a lot of very kind and generous people in here who are happy to just go ahead and download it for you and send it over.
    Quote Quote  
  5. If you could give me a list of all the videos you want I could pass them on to you. And I would also like to know why N_m3u8DL-RE doesn't work for you, so I could give you the necessary commands to download them yourself...
    Quote Quote  
  6. Originally Posted by Secranes View Post
    If you could give me a list of all the videos you want I could pass them on to you. And I would also like to know why N_m3u8DL-RE doesn't work for you, so I could give you the necessary commands to download them yourself...
    1. I'm stuck in a vicious cycle. First of all, I get a disk/directory permission denial error even though I am logged into my administrator account and I do in fact have the read & write access to all the directories I have tried to access (terminal also has full-disk access). If I am able to get past that, and the program is installed, then it says command not found. It took me like 24 hours and over 100 attempts with the help of forum members and chatgpt to get that resolved and the next one was binary issue even though I have tried both 0sx_x64 and Osx_arm64 but neither worked.

    2. That would be a huuuuge favour, brother. It'll take me a few hours to extract all the m3u8 urls. Fine if I send them over tomorrow?
    Quote Quote  
  7. Quote Quote  
  8. I'm sorry mate, but this content is marked as paid content and that's against the forum rules. I can only give you the first chapter...

    https://www.swisstransfer.com/d/86ff517b-b206-4ab7-ba8c-99d936955fbb

    Regards.
    Quote Quote  
  9. It's not paid. They just have the subscription turned on for people outside Pakistan as a precaution or something.
    If you open it with a Pakistani proxy, you'll see it's entirely free.
    Or you can use my account if that helps
    Quote Quote  
  10. I have tried many ways and I cannot access the content. I don't have paid proxies, maybe that's the reason?
    Quote Quote  
  11. Originally Posted by Secranes View Post
    I have tried many ways and I cannot access the content. I don't have paid proxies, maybe that's the reason?
    Not really sure.
    You can try accessing with my account.
    That should work.
    email: speaktorai@gmail.com
    pass PTVflix
    Quote Quote  
  12. I tried that account you provided to see if it is tied to a region, but it doesn't work either. I have also tried logging in with the VPN enabled in Pakistan and it shows up without the lock, but when it comes time to play it doesn't work either. It's very strange what's going on with that site :/...
    Last edited by Secranes; 11th Sep 2024 at 11:31.
    Quote Quote  
  13. Another user https://forum.videohelp.com/members/308780-2nHxWW6GkN1l916N3ayz8HQoi experienced the same issue but he found a proxy that worked prerfectly fine with the website. I have sent them a message. Let's see if we can get the proxy
    Quote Quote  
  14. Member aqzs's Avatar
    Join Date
    Mar 2024
    Location
    Paris
    Search Comp PM
    There isn't free content on that website ?
    Quote Quote  
  15. Code:
    import base64
    import os
    import time
    import requests
    import xmltodict
    from vinetrimmer.widevine.cdm import Cdm
    from vinetrimmer.widevine.device import RemoteDevice
    
    cdm_apis = {
        "host": "",
        "key": "",
        "device": "api",
        "type": "CHROME",
        "system_id": 41471,
        "security_level": 3,
        "name": "10",
        "username": "10",
    }
    
    
    class PTVFlix:
        api = "https://mw.hivesys.net/public"
        Authorization = "Bearer "
        headers = {
            "Authorization": Authorization,
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0",
            "devicesType": "YW5kcm9pZA==",
            "profilesId": "NDI1MDM5",
            "x-forwarded-for": "103.152.254.195"
        }
        requests = requests.Session()
        requests.headers.update(headers)
    
        #requests.proxies.update({"https": "http://127.0.0.1:8000", "http": "https://127.0.0.1:8000"})
    
        def __init__(self):
            pass
    
        def request(self, method, path, **kwargs):
            url = self.api + path if not path.startswith("http") else path
            response = self.requests.request(method, url, **kwargs)
            response = response.json()
            status = response.get("status")
            if status != 1:
                raise Exception(response)
            return response.get("response")
    
        def get_category(self, category_id=45):
            path = "/RecommendationEngine/getCategory"
            data = {
                "data": {
                    "categoriesId": category_id
                }
            }
            response = self.request("POST", path, json=data)
            category = response.get("category")
            categories_name = category.get("categoriesName")
            rows = response.get("rows", [])
            categories = []
            for row in rows:
                for content in row.get("data"):
                    content_id = content.get("id")
                    title = content.get("title")
                    categories.append([content_id, title])
            return categories
    
        def getStreamUrl(self, vodsId):
            path = "/vod/getStreamUrlV3"
            data = {
                "data": {
                    "vodsId": vodsId,
                    "type": "dash"
                }
            }
            response = self.request("POST", path, json=data)
            return response.get("url")
    
        def get_key(self, mpd_url):
            def test(rawLicense="CAQ"):
                url = "https://mw.hivesys.net/widevine_proxy"
                data = {
                    "timestamp": int(time.time()),
                    "offset": 0,
                    "edges_id": 2,
                    "devices_identification": "Win32",
                    "devices_hash": "3497433737",
                    "rawLicense": rawLicense
                }
                response = self.requests.post(url, json=data)
                data = response.json()
                return data.get("rawLicense")
    
            mpd = requests.get(mpd_url).text
            mpd_json = xmltodict.parse(mpd)
            pssh = mpd_json['MPD']['Period']['AdaptationSet'][0]['ContentProtection'][1]['cenc:pssh']
            Device = RemoteDevice(**cdm_apis)
            cdm = Cdm(Device)
            session_id = cdm.open(pssh)
            lic = test()
            cdm.set_service_certificate(
                session_id,
                lic
            )
            challenge = cdm.get_license_challenge(session_id)
            license = test(base64.urlsafe_b64encode(challenge).decode())
            cdm.parse_license(
                session_id,
                license
            )
            content_keys = [F"{x.kid.hex()}:{x.key.hex()}" for x in cdm.get_keys(session_id, content_only=True)
            ]
            return content_keys
    
    
    if __name__ == '__main__':
        ptv = PTVFlix()
        categorys = ptv.get_category()
        for category in categorys:
            id, name = category
            url = ptv.getStreamUrl(id)
            keys = ptv.get_key(url)
            key_string = ' '.join([f"--key {key}"  for key in keys])
            cmd = f"N_m3u8DL-RE.exe {url} --save-name \"{name}.mp4\" --save-dir \"./\"  --thread-count 16 --download-retry-count 30 --auto-select --check-segments-count  {key_string} -M format=mp4"
            #os.system(cmd)
            break
    discord chuliaohaibaipiao
    Quote Quote  
  16. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Novia View Post
    Code:
    import base64
    import os
    import time
    import requests
    import xmltodict
    from vinetrimmer.widevine.cdm import Cdm
    from vinetrimmer.widevine.device import RemoteDevice
    
    cdm_apis = {
        "host": "",
        "key": "",
        "device": "api",
        "type": "CHROME",
        "system_id": 41471,
        "security_level": 3,
        "name": "10",
        "username": "10",
    }
    
    
    class PTVFlix:
        api = "https://mw.hivesys.net/public"
        Authorization = "Bearer "
        headers = {
            "Authorization": Authorization,
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0",
            "devicesType": "YW5kcm9pZA==",
            "profilesId": "NDI1MDM5",
            "x-forwarded-for": "103.152.254.195"
        }
        requests = requests.Session()
        requests.headers.update(headers)
    
        #requests.proxies.update({"https": "http://127.0.0.1:8000", "http": "https://127.0.0.1:8000"})
    
        def __init__(self):
            pass
    
        def request(self, method, path, **kwargs):
            url = self.api + path if not path.startswith("http") else path
            response = self.requests.request(method, url, **kwargs)
            response = response.json()
            status = response.get("status")
            if status != 1:
                raise Exception(response)
            return response.get("response")
    
        def get_category(self, category_id=45):
            path = "/RecommendationEngine/getCategory"
            data = {
                "data": {
                    "categoriesId": category_id
                }
            }
            response = self.request("POST", path, json=data)
            category = response.get("category")
            categories_name = category.get("categoriesName")
            rows = response.get("rows", [])
            categories = []
            for row in rows:
                for content in row.get("data"):
                    content_id = content.get("id")
                    title = content.get("title")
                    categories.append([content_id, title])
            return categories
    
        def getStreamUrl(self, vodsId):
            path = "/vod/getStreamUrlV3"
            data = {
                "data": {
                    "vodsId": vodsId,
                    "type": "dash"
                }
            }
            response = self.request("POST", path, json=data)
            return response.get("url")
    
        def get_key(self, mpd_url):
            def test(rawLicense="CAQ"):
                url = "https://mw.hivesys.net/widevine_proxy"
                data = {
                    "timestamp": int(time.time()),
                    "offset": 0,
                    "edges_id": 2,
                    "devices_identification": "Win32",
                    "devices_hash": "3497433737",
                    "rawLicense": rawLicense
                }
                response = self.requests.post(url, json=data)
                data = response.json()
                return data.get("rawLicense")
    
            mpd = requests.get(mpd_url).text
            mpd_json = xmltodict.parse(mpd)
            pssh = mpd_json['MPD']['Period']['AdaptationSet'][0]['ContentProtection'][1]['cenc:pssh']
            Device = RemoteDevice(**cdm_apis)
            cdm = Cdm(Device)
            session_id = cdm.open(pssh)
            lic = test()
            cdm.set_service_certificate(
                session_id,
                lic
            )
            challenge = cdm.get_license_challenge(session_id)
            license = test(base64.urlsafe_b64encode(challenge).decode())
            cdm.parse_license(
                session_id,
                license
            )
            content_keys = [F"{x.kid.hex()}:{x.key.hex()}" for x in cdm.get_keys(session_id, content_only=True)
            ]
            return content_keys
    
    
    if __name__ == '__main__':
        ptv = PTVFlix()
        categorys = ptv.get_category()
        for category in categorys:
            id, name = category
            url = ptv.getStreamUrl(id)
            keys = ptv.get_key(url)
            key_string = ' '.join([f"--key {key}"  for key in keys])
            cmd = f"N_m3u8DL-RE.exe {url} --save-name \"{name}.mp4\" --save-dir \"./\"  --thread-count 16 --download-retry-count 30 --auto-select --check-segments-count  {key_string} -M format=mp4"
            #os.system(cmd)
            break
    Well that raises more questions than it answers.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  17. Yes and for information, your Noob Starter Pack do the job for this site

    Indeed, with a good proxy or with a good vpn, the video requested are free.

    For example, free Pakistan vpn are available on this site

    https://www.vpnjantit.com/create-free-account?server=pk1&type=Vless
    Quote Quote  
  18. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by cedric8528 View Post
    Yes and for information, your Noob Starter Pack do the job for this site
    Good to to know Cedric, thank you.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  19. If you need more help with this website, feel free to reach out to me directly
    discord=notaghost9997
    Quote Quote  
  20. You are a blessing, man.
    Thanks a load.
    Really appreciate this
    Quote Quote  
  21. Originally Posted by notaghost View Post
    If you need more help with this website, feel free to reach out to me directly
    Sure brother.
    God bless
    Quote Quote  



Similar Threads

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