VideoHelp Forum
+ Reply to Thread
Page 2 of 3
FirstFirst 1 2 3 LastLast
Results 31 to 60 of 87
Thread
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Until I can see that error in action I am unable to help. Sorry.
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  2. Originally Posted by A_n_g_e_l_a View Post
    Until I can see that error in action I am unable to help. Sorry.
    I understand, thanks.

    Re this code

    Code:
    wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic)                 
    widevine_license = httpx.post(url=lic_url, data=wvdecrypt.get_challenge(), headers=None)            
    license_b64 = b64encode(widevine_license.content)
    wvdecrypt.update_license(license_b64)
    Do you happen to know if the 403 is likely to be from a bad wv challenge? I'm wondering if something is likely to be misconfigured in my WKS-KEYS setup, or is the licence url rejecting the request even before validating the challenge.

    FWIW I'm new to all this and have not configured wks-keys beyond downloading.
    Quote Quote  
  3. Member
    Join Date
    Dec 2022
    Location
    Lesotho
    Search Comp PM
    Originally Posted by Antiques5114 View Post

    FWIW I'm new to all this and have not configured wks-keys beyond downloading.
    Do you have your own device key and blob? If not it won't work.
    Quote Quote  
  4. I'd try doing a:

    Code:
    python l3.py
    And see if WKS-KEYS works for you. It should prompt for a PSSH value. If it instead complains about something, you'll need to resolve that first.

    You need to create your own CDM (device_client_id_blob and device_private_key). Instructions are in the stickies in this forum and the files need to be put in the right places in the WKS-KEYS distribution before it'll work.

    This is the thread to help with that: https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio
    Quote Quote  
  5. Hi A_n_g_e_l_a....

    After reading post 1... there is mention of two scripts in the zip.. "Two python scripts itv_loader.py and slimitv.py".. but I have only itv_loader.py and ITVX.py an empty script called __init__.py
    and a requirments text file.... (do i rename ITVX.py to slimitv.py)... or am i missing something. many thanks for your help and hard work...
    Quote Quote  
  6. Originally Posted by dodgydodgy View Post
    ... Helpful advice ...
    Thank you. I thought that might be the case but it takes a while to get one's head around all this stuff.

    Having followed the link I was able to generate the file pair and add it to WKS-KEYS. Finally able to download what I needed
    Quote Quote  
  7. Okay, i got it, A_n_g_e_l_a,...

    There is no slimitv.py... but after running the script i am getting an error...

    D:\YT_Rips\WKS-KEYS>itv_loader.py
    ←[32m ____ ______ _ __ _ __
    / _/ /_ __/ | | / / | |/_/
    _/ / / / | |/ / _> <
    /___/ /_/ |___/ /_/|_|

    ←[0m
    ←[31mAn ITVX Video Search, Selector and Downloader.

    ←[0m
    Search word(s)? limbo
    [info] getting data for https://www.itv.com/watch/In-Limbo/10a4874
    ←[31m
    Use up/down keys + spacebar to de-select or re-select videos to download
    ←[0m
    Using pywidevine WVD on this machine
    Traceback (most recent call last):
    File "D:\YT_Rips\WKS-KEYS\itv_loader.py", line 246, in <module>
    myITV.download(url)
    File "D:\YT_Rips\WKS-KEYS\ITVX.py", line 168, in download
    key = self.get_key(pssh, lic_url)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\YT_Rips\WKS-KEYS\ITVX.py", line 82, in get_key
    from pywidevine.cdm import Cdm
    ModuleNotFoundError: No module named 'pywidevine.cdm'

    I'm aware there is no pywidevine.cdm module,... as I had this error once before. I cured it by making sure that an empty __init__.py was in every folder within the pywidevine folder. I have checked and they are within the folders. So i'm unsure why i am getting the error.

    my reason for changing to this script is due to the 403 error with my older a_n_g_e_l_a script..
    Quote Quote  
  8. I'm assuming you're using WKS-KEYS given the folder name.
    Did you change PYWIDEVINE = False in ITVX.py?
    Quote Quote  
  9. Thank you dodgydodgy,

    Testing on a series now,... I changed it to False and now its working. I was trying before on single episodes,... but I've decided to let it go on a four part series. Also Thank you A_n_g_e_l_a, It looks really smart.
    My main folder is getting full up with old scripts,... its looking a right mess. Wish I could have Half a dozen WKS-KEYS folders,.. each one holding a script. But I'm guessing one can only have a single WKS-KEYS folder on a P.C.
    Quote Quote  
  10. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by LastResort View Post
    But I'm guessing one can only have a single WKS-KEYS folder on a P.C.
    No you can have as many as you like. But consider using pywidevine and creating a wvd file. That then can be called from anywhere on your system and uses a single bloc and key rather that lots of them in WKS-KEYS folders..
    Code:
    pywidevine -create-devices --help
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  11. Thank you A_n_g_e_l_a,

    I was going to try and have a folder for CH5, one for itv, one for all4, ect.. Each containing the relevant script. I'm having to create txt files to remind me which ones work there are so many scripts in there, also due to me examining the scripts and creating new ones. (it's basically a mess).
    This was the only info i could gain from a quick google search: https://github.com/rlaphoenix/pywidevine/releases

    "Added new export-device command-line function to export WVD files back as files. I.e., a private key and client ID" blob file.
    This is going to look easy for the experts, but I have no idea what the Code would do if i ran it.
    After reading your post a dozen or so times, I think I slightly understand what you mean... I have a single WKS-KEYS folder.... Then on a separate drive a selection of folders named as i want them. place the relevant script into each of the folders.
    But I would not need to have a wks-keys folder in each. But i would need ffmpeg.exe ffprobe.exe an elevated command prompt, mkvmerge.exe, mp4decrypt.exe, n_m3u8dl-cli_v2.9.8.exe, and n_m3u8dl-re.exe, along with n_m3u8dl-cli-simpleg.exe placed into each of my folders.
    Quote Quote  
  12. Hi LastResort,

    You wouldn't need to have all those files in each of your folders. All you need to do is add them into the PATH on your PC.
    The quickest way to do this is to put them in the C:\windows\system32 folder. You will then be able to run them in any command prompt run from any directory on your PC.

    Basically, when you call a windows executable, windows will look in the folder you've run the script from first, if it doesn't find it it then looks in all the folders mentioned in your PATH and when it finds it it will run it. C:\windows\system32 is always in the PATH in windows so just put the files in there and it will automatically find it. Obviously if you want to update to new versions of files in the future then you just copy over the file in c:\windows\system32 with the updated file.
    Quote Quote  
  13. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    There is an update at #1 .

    It is very minor but cleans up exiting the program mid-way through the selection of downloads. Ctrl-C will either take you back stage or exit according to where you've reached. So if you don't like the search result and need to enter a new term Ctrl-C will do it.

    Less minor is that requirements.txt has been tightened to specify versions of the module imports. Should stop the recent mess with httpx versions being incompatible.
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  14. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by A_n_g_e_l_a View Post
    Great! And thanks for the confirmation.

    That was a hard one to spot!
    Just wanted to confirm this also solved it for me, so definitely seems to be the culprit. Good sleuthing!
    Quote Quote  
  15. Hi All, super new to all this and would appreciate some help if you dont mind.

    I seem to be getting the following
    Code:
    Using pywidevine WVD on this machine
    Traceback (most recent call last):
      File "C:\itvx\itv_loader.py", line 254, in <module>
        myITV.download(url)
      File "C:\itvx\ITVX.py", line 168, in download
        key = self.get_key(pssh, lic_url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\itvx\ITVX.py", line 86, in get_key
        device = Device.load(WVD_PATH)
                 ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\site-packages\pywidevine\device.py", line 164, in load
        with Path(path).open(mode="rb") as f:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 1044, in open
        return io.open(self, mode, buffering, encoding, errors, newline)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '\\home\\name\\android_sdk.wvd'
    PS C:\itvx>
    Any pointers in where to get android_sdk.wvd please
    Quote Quote  
  16. You need your own CDM and you need your own working pywidevine setup before you run this script.
    Follow the stickies in this forum, they take you through it all.
    Quote Quote  
  17. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by phantom84 View Post
    Hi All, super new to all this and would appreciate some help if you dont mind.

    Any pointers in where to get android_sdk.wvd please
    Depending where you are on your journey dodgydodgy's advice is for getting a Content Decryption Module and if you just need a wvd file that points to your CDM https://forum.videohelp.com/threads/411862-Beyond-WKS-KEYS
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  18. Thank you for another great script Angela! The search function has changed my life.
    Quote Quote  
  19. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Drank9823 View Post
    Thank you for another great script Angela! The search function has changed my life.
    Thanks!

    If you liked the search style then these are of the same format.

    Channel4 https://files.videohelp.com/u/301890/channel4.zip
    My 5 https://files.videohelp.com/u/301890/my5_update.zip
    STV https://files.videohelp.com/u/301890/stv_files.zip for 1080p vidoes on ITV platform
    UKTVPlay https://files.videohelp.com/u/301890/uktvp_files.zip Dave, Yesterday etc

    And coming soon a fully searchable all-in-one for these 5 UK channels from a single starting point.
    Last edited by A_n_g_e_l_a; 6th Oct 2023 at 11:01.
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  20. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by phantom84 View Post
    Hi All, super new to all this and would appreciate some help if you dont mind.

    Any pointers in where to get android_sdk.wvd please
    Depending where you are on your journey dodgydodgy's advice is for getting a Content Decryption Module and if you just need a wvd file that points to your CDM https://forum.videohelp.com/threads/411862-Beyond-WKS-KEYS
    I now have my own device_client_id_blob & device_private_key and tried to make my own android_sdk.wvd using json file with

    Code:
    {
      "device_private_key_url": "C:\dumper-main\key_dumps\Android Emulator 5554\private_keys\4464\1991389027\device_private_key",
      "device_client_blob_url": "C:\dumper-main\key_dumps\Android Emulator 5554\private_keys\4464\1991389027\device_client_id_blob"
    }
    but that didnt work, any pointers?
    Quote Quote  
  21. "Beyond WKS-KEYS" describes a different way of building a .wvd file, a JSON file is not involved there. Maybe you should follow the instructions from that post?
    Quote Quote  
  22. Sorry I posted in wrong thread. Multiple pages open. Will Post there
    Quote Quote  
  23. Last hurdle I think... How do I point the ITVX.py to the .wvd file as I am getting
    Code:
    Using pywidevine WVD on this machine
    Traceback (most recent call last):
      File "C:\itvx\itv_loader.py", line 254, in <module>
        myITV.download(url)
      File "C:\itvx\ITVX.py", line 168, in download
        key = self.get_key(pssh, lic_url)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\itvx\ITVX.py", line 86, in get_key
        device = Device.load(WVD_PATH)
                 ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\site-packages\pywidevine\device.py", line 164, in load
        with Path(path).open(mode="rb") as f:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 1044, in open
        return io.open(self, mode, buffering, encoding, errors, newline)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '\\home\\name\\android_sdk.wvd'
    PS C:\itvx>
    I also tried
    Code:
    WVD_PATH = "C:\Users\name\WVD\google_aosp_on_ia_emulator_14.0.0_381026f8_4464_l3.wvd"
    Which gives me

    Code:
    PS C:\itvx> py itv_loader.py
    Traceback (most recent call last):
      File "C:\itvx\itv_loader.py", line 19, in <module>
        import ITVX as itv
      File "C:\itvx\ITVX.py", line 36
        WVD_PATH = "C:\Users\name\WVD\google_aosp_on_ia_emulator_14.0.0_381026f8_4464_l3.wvd"
                                                                                            ^
    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
    PS C:\itvx>
    Changed so the path is
    Code:
        WVD_PATH = "C:\\Users\\name\\WVD\\google_aosp_on_ia_emulator_14.0.0_381026f8_4464_l3.wvd"
    Code:
    Using pywidevine WVD on this machine
    Keys found 842f32ccf8794bcfaa46f49c510cd8c6:b005removde9883aab625cf
    Traceback (most recent call last):
      File "C:\itvx\itv_loader.py", line 254, in <module>
        myITV.download(url)
      File "C:\itvx\ITVX.py", line 207, in download
        subprocess.run(command)
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
        with Popen(*popenargs, **kwargs) as process:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    PS C:\itvx>
    Last edited by phantom84; 6th Oct 2023 at 14:10.
    Quote Quote  
  24. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by phantom84 View Post
    Last hurdle I think..

    Code:
    WVD_PATH =r"C:\Users\name\WVD\google_aosp_on_ia_emulator_14.0.0_381026f8_4464_l3.wvd"
    See the red bit
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  25. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by phantom84 View Post
    Last hurdle I think..

    Code:
    WVD_PATH =r"C:\Users\name\WVD\google_aosp_on_ia_emulator_14.0.0_381026f8_4464_l3.wvd"
    See the red bit
    Ahh fish sticks! Close I think I can feel it!

    Code:
    Using pywidevine WVD on this machine
    Keys found 842f32ccf8794bremoved883aab625cf
    Traceback (most recent call last):
      File "C:\itvx\itv_loader.py", line 254, in <module>
        myITV.download(url)
      File "C:\itvx\ITVX.py", line 207, in download
        subprocess.run(command)
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
        with Popen(*popenargs, **kwargs) as process:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "C:\Users\name\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    PS C:\itvx>
    Quote Quote  
  26. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by phantom84 View Post
    Ahh fish sticks! Close I think I can feel it!
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    Clearly you are very much a beginner at this with limited computing experience. Whilst in itself that is OK, after all we each were beginners once, endless small-step questions only fill up a thread with irrelevance for most and which tries the patience of older hands. The answers you seek are already here; printed in many places; the questions have been asked many times; many, many times. (Apologies to Round The Horne and Betty Marsden ) In fact for many of us it seems like Ground-Hog-Day here.

    As an attempt to provide answers to newbies I wrote a few guides that appear in the 'stickies' and you need to read them. Start at 'Decryption: The last Crusade' - skipping a couple of guides - since you already have a CDM and are likely only going to be a script user. Most of your answers are there.

    Secondly, when faced with a screen and keyboard the technology can over-whelm; we all feel that; keep your brain in gear and when you get an error message - as you will - ask yourself what does it mean? Look at the last bit of the error message above, the script - for that it what it is, it is not a program - the script calls other programs on your machine to download and decrypt a video. Since this is the very first time you've every tried such a thing your system lacks the programs the script calls. That is what the error message is complaining about. So next time instead of printing a whole host of error code you can ask what do I need to do to avoid a file not found error. And the answer would be provide the 'file'. And if you look through the script you might find where an external file using a 'subprocess.run' method is being called. Then you have a clue to what is missing. What is harder is that missing program calls others that will not be on your system yet either.

    As a script writer I know my target audience have already served their apprenticeship, They read The Temple of Doom; they used l3.py to get keys; they used yt-dlp to download audio and video streams; they decrypted and merged the streams into a playable video; renaming and saving. You haven't served your apprenticeship yet so get get reading the stickie mentioned and inform yourself, as each before you has done. The answers are there. But if they are NOT then people are more willing to help.
    Last edited by A_n_g_e_l_a; 7th Oct 2023 at 06:16.
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  27. Member
    Join Date
    Dec 2022
    Location
    Lesotho
    Search Comp PM
    @phantom84 Another small piece of advice following on from what A_n_g_e_l_a mentioned. Set up virtual environments for running python scripts as this will help to avoid plenty of issues not directly related to the script in question.

    In short, uninstall Python then reinstall with just the defaults. Don't install any other package or module.

    Then create virtual environments for each script/project that you need to run.

    For example.

    C:\DLers\angela\itv
    C:\DLers\angela\stv
    C:\DLers\angela\ch4

    Within each respective project folder create a virtual environment. I use .venv but the naming is up to you.

    Once activated, then and only then do you start installing packages. These will only be accessible from within that venv so won't affect any other project.

    Eventually you'll work out which packages you can install in the host without messing up the venvs but the method above will eliminate cross script dependency issues.

    Remember once you've install a package in a venv, it's there until you either uninstall it or or delete the venv folder.
    Quote Quote  
  28. Member
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by phantom84 View Post
    Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by phantom84 View Post
    Hi All, super new to all this and would appreciate some help if you dont mind.

    Any pointers in where to get android_sdk.wvd please
    Depending where you are on your journey dodgydodgy's advice is for getting a Content Decryption Module and if you just need a wvd file that points to your CDM https://forum.videohelp.com/threads/411862-Beyond-WKS-KEYS
    I now have my own device_client_id_blob & device_private_key and tried to make my own android_sdk.wvd using json file with

    Code:
    {
      "device_private_key_url": "C:\dumper-main\key_dumps\Android Emulator 5554\private_keys\4464\1991389027\device_private_key",
      "device_client_blob_url": "C:\dumper-main\key_dumps\Android Emulator 5554\private_keys\4464\1991389027\device_client_id_blob"
    }
    but that didnt work, any pointers?
    If you have those files properly generated it's probably easier for you to just use WKS_KEYS, at least until you learn a bit more.

    All you need to do is download WKS-KEYS from here - https://github.com/weapon121/WKS-KEY/releases/

    Then put those two files in the WKS-KEYS\pywidevine\L3\cdm\devices\android_generic folder, replacing the two already in there. That should be it, as long as you've installed all the correct python modules it should then work. It does for me, on Windows 11.

    Oh, make sure you edit ITVX.py to say PYWIDEVINE = False.
    Quote Quote  
  29. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Killer3737 View Post
    If you have those files properly generated it's probably easier for you to just use WKS_KEYS, at least until you learn a bit more.

    All you need to do is download WKS-KEYS from here - https://github.com/weapon121/WKS-KEY/releases/
    Not that very out of date release please.

    The release below, has updated protobufs, so WKS-KEYS and pywidevine do not have conflicts over the protobuf versions. So migrating from one to the other isn't a fraught experience.

    (Sounds like you need to update WKS-KEYS too? )

    WKS-KEYS is here https://files.videohelp.com/u/301890/WKS-KEYS.zip

    And I actually disagree with you. I think pywidevine is on the whole easier.
    Last edited by A_n_g_e_l_a; 10th Oct 2023 at 11:18.
    Do not PM me please. Just ask your question here!
    https://forum.videohelp.com/threads/413534-From-My-Postbox
    Quote Quote  
  30. im needing a little small script the MPDs seem to have a token that expires in 6 hours any advice on how to login with a script call https://www.itv.com/watch?channel=fast1 and have it return just the MPD with a updated token? so i can run it every 6 hours to keep the token updated (key dont change and i already have the key for the MPDs) i just need a small quick script to grab the new mpd each time its ran!
    (i already have the key)
    any advice on a script to just grab the MPD token?
    Quote Quote  



Similar Threads

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