VideoHelp Forum


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


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


+ Reply to Thread
Page 2 of 5
FirstFirst 1 2 3 4 ... LastLast
Results 31 to 60 of 124
Thread
  1. psaframe
    Join Date
    Mar 2021
    Location
    Algeria
    Search PM
    Originally Posted by SnoopDawg View Post
    Originally Posted by Diazole View Post
    I couldn't find a working C4 script so I wrote my own - https://github.com/Diazole/c4-dl.
    Forgive my ignorance as I'm new to using youtube-dl etc but I would like to learn how to download videos from Channel 4. I've downloaded the zip from GitHub but I'm clueless as to how to install and use. Is there some instructions or a video, or something I should be reading to get started? I'm a software developer by trade so not totally alien to scripting but as I said this is new to me.
    try to follow this methode, i's worked for me as well

    https://forum.videohelp.com/threads/407144-Help-with-Channel-4-Key-to-this-programme-a...se#post2668861
    Quote Quote  
  2. can anyone help me im getting this error

    im getting this now:

    C:\Users\danny\Desktop\c4-dl-master\c4-dl-master>py .\c4-dl.py --download --wvd "C:\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\danny\Desktop\c4-dl-master\c4-dl-master\c4-dl.py", line 10, in <module>
    import requests
    ModuleNotFoundError: No module named 'requests'

    i tried to install requests via pip install requests
    Quote Quote  
  3. Member
    Join Date
    Dec 2021
    Location
    Scotland
    Search Comp PM
    I have my own solutions for ITVX, All4, CH5, UKTV, RTE, Discovery+, STV (encrypted) which I've automated with extra script as much as possible and I've been pretty happy with (they work lol). They are based on the original WKS-KEYS but with some modifications. They do require some manual input like mpd, licence, PSSH (for Britbox/ ITVX), and copying cURL to Python for All4 and Disc+. None of these use this "new" pywidevine module.

    So, I thought I'd look at this all-in-one solution for All4. I installed the said pywidevine module. Well, that didn't go too well lol. My ITVX and STV solutions stopped working (came up with errors). It seems that the problem is installing pywidevine also updates already installed modules (like protobuf). The older scripts don't like these latest versions.

    Fortunately, I have a backup of my Scripts and site-packages folders, so it was easy to reverse the situation.
    Last edited by deccavox; 23rd Nov 2022 at 07:45.
    Quote Quote  
  4. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by deccavox View Post
    I have my own solutions for ITVX, All4, CH5, UKTV, RTE, Discovery+, STV (encrypted) which I've automated with extra script as much as possible and I've been pretty happy with (they work lol). They are based on the original WKS-KEYS but with some modifications. They do require some manual input like mpd, licence, PSSH (for Britbox/ ITVX), and copying cURL to Python for All4 and Disc+. None of these use this "new" pywidevine module.

    So, I thought I'd look at this all-in-one solution for All4. I installed the said pywidevine module. Well, that didn't go too well lol. My ITVX and STV solutions stopped working (came up with errors). It seems that the problem is installing pywidevine also updates already installed modules (like protobuf). The older scripts don't like these latest versions.

    Fortunately, I have a backup of my Scripts and site-packages folders, so it was easy to reverse the situation.
    Been there too, see the end of this post under 'Gotchas' https://forum.videohelp.com/threads/407216-Decryption-The-Dungeon-of-Despair#post2669281

    If you get caught this way and you want to use WKS_KEYS then remove protofub 4.x.x (pip uninstall protobuf) and run pip install 'protobuf==3.20.3' to install this older version.
    Quote Quote  
  5. Originally Posted by deccavox View Post
    I have my own solutions for ITVX, All4, CH5, UKTV, RTE, Discovery+, STV (encrypted) which I've automated with extra script as much as possible and I've been pretty happy with (they work lol). They are based on the original WKS-KEYS but with some modifications. They do require some manual input like mpd, licence, PSSH (for Britbox/ ITVX), and copying cURL to Python for All4 and Disc+. None of these use this "new" pywidevine module.

    So, I thought I'd look at this all-in-one solution for All4. I installed the said pywidevine module. Well, that didn't go too well lol. My ITVX and STV solutions stopped working (came up with errors). It seems that the problem is installing pywidevine also updates already installed modules (like protobuf). The older scripts don't like these latest versions.

    Fortunately, I have a backup of my Scripts and site-packages folders, so it was easy to reverse the situation.
    can u send me all of your tools via dm plz
    Quote Quote  
  6. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    Originally Posted by deccavox View Post
    I have my own solutions for ITVX, All4, CH5, UKTV, RTE, Discovery+, STV (encrypted) which I've automated with extra script as much as possible and I've been pretty happy with (they work lol). They are based on the original WKS-KEYS but with some modifications. They do require some manual input like mpd, licence, PSSH (for Britbox/ ITVX), and copying cURL to Python for All4 and Disc+. None of these use this "new" pywidevine module.

    So, I thought I'd look at this all-in-one solution for All4. I installed the said pywidevine module. Well, that didn't go too well lol. My ITVX and STV solutions stopped working (came up with errors). It seems that the problem is installing pywidevine also updates already installed modules (like protobuf). The older scripts don't like these latest versions.

    Fortunately, I have a backup of my Scripts and site-packages folders, so it was easy to reverse the situation.
    I'm able to use both WKS and Diazole's script by renaming the pywidevine directory in WKS and also the pywidevine imports in all the WKS py files into "pywdv"
    can't remember if there were problems with protobufs
    Quote Quote  
  7. First of all, thank you Diazole for this script. I've learned a ton going through it.

    Just a minor caution for those using it. Some channel 4 shows have a descriptive audio track and this script grabs the "ba" best audio by default. For me, this usually meant it grabbed the descriptive audio track. So, I just changed it to "audio=128000" which is the regular English track.

    And for anyone interested in subtitles, you can add a snippet to get_vod_stream() to find it. This example tries to find the associated .vtt. Other formats are available too, but not all shows have all formats. But I found that most shows had a .vtt so that is what I look for.
    Code:
            for i in resp['subtitlesAssets']:
                if (os.path.splitext(i['url'])[1]==".vtt"):
                    print(i['url'])
    If wish the script could find the 5000Kbs streams, but that's a much bigger project and I think I need to learn a lot more stuff before I can do that.
    Quote Quote  
  8. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    Originally Posted by achilles View Post
    If wish the script could find the 5000Kbs streams, but that's a much bigger project and I think I need to learn a lot more stuff before I can do that.
    someone talked about it here and the gist seems to be that those streams are for smart tvs
    maybe you could spoof a smart tv through android studio(?) or some other emulator and then use http toolkit to look at the traffic when accessing a show and see if there's some kind of token or whatever that gets sent to unlock a better stream
    Quote Quote  
  9. Originally Posted by achilles View Post
    First of all, thank you Diazole for this script. I've learned a ton going through it.

    Just a minor caution for those using it. Some channel 4 shows have a descriptive audio track and this script grabs the "ba" best audio by default. For me, this usually meant it grabbed the descriptive audio track. So, I just changed it to "audio=128000" which is the regular English track.

    And for anyone interested in subtitles, you can add a snippet to get_vod_stream() to find it. This example tries to find the associated .vtt. Other formats are available too, but not all shows have all formats. But I found that most shows had a .vtt so that is what I look for.
    Code:
            for i in resp['subtitlesAssets']:
                if (os.path.splitext(i['url'])[1]==".vtt"):
                    print(i['url'])
    If wish the script could find the 5000Kbs streams, but that's a much bigger project and I think I need to learn a lot more stuff before I can do that.
    Good spot on the descriptive audio track, unfortunately "audio=128000" won't work in all scenarios as the name of the audio track isn't always the same. I think it's better, albeit hacky, to set a regex on the audio, "ba[language~="[a-z-Z]{0,0}"]", unless someone has a better idea.

    I've managed to figure out how to get the 5000kbps stream so i'll update the script once i've finished testing.
    Quote Quote  
  10. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Diazole View Post

    I've managed to figure out how to get the 5000kbps stream so i'll update the script once i've finished testing.
    Code:
        #wa ~worst-audio needed as channel4 ba downloads a narration audio version for visually impaired.
        os.system(f"yt-dlp --allow-u -f wa -o 'encryptAud.%(ext)s' {url}")
    I have this in my channel4 script that uses WKS-KEYS. It works.
    Quote Quote  
  11. I also use worstaudio and to date have never had an issue. As previously commented using bestaudio gets you the AD track.
    Quote Quote  
  12. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by Diazole View Post

    I've managed to figure out how to get the 5000kbps stream so i'll update the script once i've finished testing.
    Code:
        #wa ~worst-audio needed as channel4 ba downloads a narration audio version for visually impaired.
        os.system(f"yt-dlp --allow-u -f wa -o 'encryptAud.%(ext)s' {url}")
    I have this in my channel4 script that uses WKS-KEYS. It works.
    I don't think that's any better because you could potentially download a lower bit rate audio stream?

    The reason "ba" grabs the descriptive audio track is because yt-dlp sorts by lang to figure out the best audio. The descriptive stream has lang="en" whereas the normal stream does not.

    The correct way would be to make yt-dlp check the Role node as that contains whether the stream is descriptive or not, but I don't think yt-dlp supports that.

    Normal:
    Code:
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
    Descriptive:
    Code:
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="description" />
    Quote Quote  
  13. Originally Posted by Diazole View Post
    Originally Posted by achilles View Post
    First of all, thank you Diazole for this script. I've learned a ton going through it.

    Just a minor caution for those using it. Some channel 4 shows have a descriptive audio track and this script grabs the "ba" best audio by default. For me, this usually meant it grabbed the descriptive audio track. So, I just changed it to "audio=128000" which is the regular English track.

    And for anyone interested in subtitles, you can add a snippet to get_vod_stream() to find it. This example tries to find the associated .vtt. Other formats are available too, but not all shows have all formats. But I found that most shows had a .vtt so that is what I look for.
    Code:
            for i in resp['subtitlesAssets']:
                if (os.path.splitext(i['url'])[1]==".vtt"):
                    print(i['url'])
    If wish the script could find the 5000Kbs streams, but that's a much bigger project and I think I need to learn a lot more stuff before I can do that.
    Good spot on the descriptive audio track, unfortunately "audio=128000" won't work in all scenarios as the name of the audio track isn't always the same. I think it's better, albeit hacky, to set a regex on the audio, "ba[language~="[a-z-Z]{0,0}"]", unless someone has a better idea.

    I've managed to figure out how to get the 5000kbps stream so i'll update the script once i've finished testing.
    are u gonna update the script and post it here? please? or can u update and send me the script to try please
    Quote Quote  
  14. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Diazole View Post
    I don't think that's any better because you could potentially download a lower bit rate audio stream?

    The reason "ba" grabs the descriptive audio track is because yt-dlp sorts by lang to figure out the best audio. The descriptive stream has lang="en" whereas the normal stream does not.
    No the reason ba grabs the descriptive track is because it is the last audio track, just the same as best video is the last in the list.

    I'm a pragmatist. and If you feel the need to spend hours looking at ways of ensuring you don't get the descriptive track go ahead and over-engineer.

    Whenever I've looked at channel4 - and I don't these day because someone gave me a damn-good downloader - I only saw two audio tracks.

    Image
    [Attachment 68483 - Click to enlarge]
    Last edited by A_n_g_e_l_a; 2nd Jan 2023 at 07:14.
    Quote Quote  
  15. Originally Posted by A_n_g_e_l_a View Post
    I'm a pragmatist. and If you feel the need to spend hours looking at ways of ensuring you don't get the descriptive track go ahead and over-engineer.
    Doing the correct thing isn't overengineering, selecting the worst audio quality will work whilst there are only two audio streams, but it's far from ideal.

    Originally Posted by A_n_g_e_l_a View Post
    Whenever I've looked at channel4 - and I don't these day because someone gave me a damn-good downloader - I only saw two audio tracks.
    What makes this channel4 downloader you speak of so "damn-good"? Care to share it with the community?
    Quote Quote  
  16. Thanks for the heads up about the 5000kbps support. Incidentally, I've always used a different bodge for the audio when an AD track/channel is present: "ba.2", but I might switch to the regex approach.
    Quote Quote  
  17. Originally Posted by bamboobali View Post
    Thanks for the heads up about the 5000kbps support. Incidentally, I've always used a different bodge for the audio when an AD track/channel is present: "ba.2", but I might switch to the regex approach.
    I've updated the script to grab the highest bitrate stream, the highest I've seen so far is 6000kbps.

    I did some testing and found that C4 isn't consistent with the language attribute so my previous comment about using a regex to check the length isn't 100% effective. I also tried "ba.2" during my testing but I found that not every MPD has multiple streams (not all episodes support AD), so this isn't 100% effective either.

    I've resorted to "wa" which isn't great. The actual fix would be to make yt-dl expose the "Role" node so we can filter on "value".
    Quote Quote  
  18. Originally Posted by Diazole View Post
    Originally Posted by bamboobali View Post
    Thanks for the heads up about the 5000kbps support. Incidentally, I've always used a different bodge for the audio when an AD track/channel is present: "ba.2", but I might switch to the regex approach.
    I've updated the script to grab the highest bitrate stream, the highest I've seen so far is 6000kbps.

    I did some testing and found that C4 isn't consistent with the language attribute so my previous comment about using a regex to check the length isn't 100% effective. I also tried "ba.2" during my testing but I found that not every MPD has multiple streams (not all episodes support AD), so this isn't 100% effective either.

    I've resorted to "wa" which isn't great. The actual fix would be to make yt-dl expose the "Role" node so we can filter on "value".
    im getting this error can u help please:

    c4-dl.py", line 13, in <module>
    from Crypto.Cipher import AES
    ModuleNotFoundError: No module named 'Crypto'

    but i have it installed:
    Installing collected packages: Crypto
    Successfully installed Crypto-1.4.1
    Last edited by Dannyboi; 3rd Jan 2023 at 12:47.
    Quote Quote  
  19. Originally Posted by Dannyboi View Post
    im getting this error can u help please:

    c4-dl.py", line 13, in <module>
    from Crypto.Cipher import AES
    ModuleNotFoundError: No module named 'Crypto'

    but i have it installed:
    Installing collected packages: Crypto
    Successfully installed Crypto-1.4.1
    You probably have multiple crypto packages installed, run the following and use python 3 to run the script.

    Code:
    pip3 uninstall crypto 
    pip3 uninstall pycrypto 
    pip3 install pycryptodome
    Quote Quote  
  20. Originally Posted by Diazole View Post
    Originally Posted by Dannyboi View Post
    im getting this error can u help please:

    c4-dl.py", line 13, in <module>
    from Crypto.Cipher import AES
    ModuleNotFoundError: No module named 'Crypto'

    but i have it installed:
    Installing collected packages: Crypto
    Successfully installed Crypto-1.4.1
    You probably have multiple crypto packages installed, run the following and use python 3 to run the script.

    Code:
    pip3 uninstall crypto 
    pip3 uninstall pycrypto 
    pip3 install pycryptodome
    tried that following errors:

    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --wvd
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\__init__.py", line 1, in <module>
    from .cdm import *
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\cdm.py", line 10, in <module>
    from pywidevine.cdm.formats import wv_proto2_pb2 as wv_proto2
    ModuleNotFoundError: No module named 'pywidevine.cdm.formats'; 'pywidevine.cdm' is not a package

    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\__init__.py", line 1, in <module>
    from .cdm import *
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\cdm.py", line 10, in <module>
    from pywidevine.cdm.formats import wv_proto2_pb2 as wv_proto2
    ModuleNotFoundError: No module named 'pywidevine.cdm.formats'; 'pywidevine.cdm' is not a package
    Quote Quote  
  21. Originally Posted by Diazole

    I've updated the script to grab the highest bitrate stream, the highest I've seen so far is 6000kbps.

    I did some testing and found that C4 isn't consistent with the language attribute so my previous comment about using a regex to check the length isn't 100% effective. I also tried "ba.2" during my testing but I found that not every MPD has multiple streams (not all episodes support AD), so this isn't 100% effective either.

    I've resorted to "wa" which isn't great. The actual fix would be to make yt-dl expose the "Role" node so we can filter on "value".
    N_m3u8DL-RE seems to pick the correct audio track automatically, so that's another option:

    Image
    [Attachment 68507 - Click to enlarge]


    Also, big thanks for sharing your scripts! I'm trying to get better at python, and your stuff is a great learning tool.
    Quote Quote  
  22. Originally Posted by Dannyboi View Post
    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\__init__.py", line 1, in <module>
    from .cdm import *
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\cdm.py", line 10, in <module>
    from pywidevine.cdm.formats import wv_proto2_pb2 as wv_proto2
    ModuleNotFoundError: No module named 'pywidevine.cdm.formats'; 'pywidevine.cdm' is not a package
    You've copied the "original"/"old" pywidevine into the pywidevine package folder...

    Delete the "pywidevine" located at "C:\Users\Maverick\AppData\Local\Programs\Pyth on\P ython310\lib\site-packages\pywidevine\" and then run:

    Code:
    pip install pywidevine
    That will install the actual pywidevine package provided by rlaphoenix.

    Two things:
    1. Why does your "P ython310" folder contain a space?
    2. Don't copy/paste files into site-packages, that's why you have pip.
    Quote Quote  
  23. Originally Posted by Diazole View Post
    Originally Posted by Dannyboi View Post
    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\__init__.py", line 1, in <module>
    from .cdm import *
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\cdm.py", line 10, in <module>
    from pywidevine.cdm.formats import wv_proto2_pb2 as wv_proto2
    ModuleNotFoundError: No module named 'pywidevine.cdm.formats'; 'pywidevine.cdm' is not a package
    You've copied the "original"/"old" pywidevine into the pywidevine package folder...

    Delete the "pywidevine" located at "C:\Users\Maverick\AppData\Local\Programs\Pyth on\P ython310\lib\site-packages\pywidevine\" and then run:

    Code:
    pip install pywidevine
    That will install the actual pywidevine package provided by rlaphoenix.

    Two things:
    1. Why does your "P ython310" folder contain a space?
    2. Don't copy/paste files into site-packages, that's why you have pip.
    Python310 doesnt have a space and i deleted the pywidevine folder and tried the cmd pip install pywidevine but getting this error now

    Microsoft Windows [Version 10.0.19044.2364]
    (c) Microsoft Corporation. All rights reserved.

    C:\Users\Maverick>pip install pywidevine
    Requirement already satisfied: pywidevine in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (1.5.2)
    Requirement already satisfied: Unidecode<2.0.0,>=1.3.4 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (1.3.6)
    Requirement already satisfied: lxml>=4.9.1 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (4.9.1)
    Requirement already satisfied: pycryptodome<4.0.0,>=3.15.0 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (3.15.0)
    Requirement already satisfied: requests<3.0.0,>=2.28.1 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (2.28.1)
    Requirement already satisfied: pymp4<2.0.0,>=1.2.0 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (1.2.0)
    Requirement already satisfied: protobuf==4.21.6 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (4.21.6)
    Requirement already satisfied: click<9.0.0,>=8.1.3 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (8.1.3)
    Requirement already satisfied: colorama in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from click<9.0.0,>=8.1.3->pywidevine) (0.4.6)
    Requirement already satisfied: construct==2.8.8 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pymp4<2.0.0,>=1.2.0->pywidevine) (2.8.8)
    Requirement already satisfied: idna<4,>=2.5 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.10)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (1.26.5)
    Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.1.1)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2022.9.24)
    Quote Quote  
  24. Originally Posted by Diazole View Post
    1. Why does your "P ython310" folder contain a space?
    It doesn't.
    Originally Posted by jack_666 View Post
    @helloImNoob, kindly use the Code tag (#) when inserting text such as keys so as to prevent the spaces that this vBulletin program inserts.
    Quote Quote  
  25. Originally Posted by Diazole View Post
    Originally Posted by Dannyboi View Post
    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\__init__.py", line 1, in <module>
    from .cdm import *
    File "C:\Users\Maverick\AppData\Local\Programs\Python\P ython310\lib\site-packages\pywidevine\cdm.py", line 10, in <module>
    from pywidevine.cdm.formats import wv_proto2_pb2 as wv_proto2
    ModuleNotFoundError: No module named 'pywidevine.cdm.formats'; 'pywidevine.cdm' is not a package
    You've copied the "original"/"old" pywidevine into the pywidevine package folder...

    Delete the "pywidevine" located at "C:\Users\Maverick\AppData\Local\Programs\Pyth on\P ython310\lib\site-packages\pywidevine\" and then run:

    Code:
    pip install pywidevine
    That will install the actual pywidevine package provided by rlaphoenix.

    Two things:
    1. Why does your "P ython310" folder contain a space?
    2. Don't copy/paste files into site-packages, that's why you have pip.
    current error:

    \c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    ModuleNotFoundError: No module named 'pywidevine'

    after entering pip install pywidevine

    also my python310 folder doesnt contain a space but for some reason when i paste what it says in cmd on this site it adds a space for some reason

    Microsoft Windows [Version 10.0.19044.2364]
    (c) Microsoft Corporation. All rights reserved.

    C:\Users\Maverick>pip install pywidevine
    Requirement already satisfied: pywidevine in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (1.5.2)
    Requirement already satisfied: Unidecode<2.0.0,>=1.3.4 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (1.3.6)
    Requirement already satisfied: click<9.0.0,>=8.1.3 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (8.1.3)
    Requirement already satisfied: protobuf==4.21.6 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (4.21.6)
    Requirement already satisfied: requests<3.0.0,>=2.28.1 in c:\users\Maverick\appdata\roaming\python\python310 \site-packages (from pywidevine) (2.28.1)
    Requirement already satisfied: lxml>=4.9.1 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (4.9.1)
    Requirement already satisfied: pycryptodome<4.0.0,>=3.15.0 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (3.15.0)
    Requirement already satisfied: pymp4<2.0.0,>=1.2.0 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pywidevine) (1.2.0)
    Requirement already satisfied: colorama in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from click<9.0.0,>=8.1.3->pywidevine) (0.4.6)
    Requirement already satisfied: construct==2.8.8 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from pymp4<2.0.0,>=1.2.0->pywidevine) (2.8.8)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (1.26.5)
    Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.1.1)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2022.9.24)
    Requirement already satisfied: idna<4,>=2.5 in c:\users\Maverick\appdata\local\programs\python\py thon310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.10)

    C:\Users\Maverick>
    Quote Quote  
  26. Originally Posted by Dannyboi View Post

    Python310 doesnt have a space and i deleted the pywidevine folder and tried the cmd pip install pywidevine but getting this error now

    Code:
    Microsoft Windows [Version 10.0.19044.2364]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Users\Maverick>pip install pywidevine
    Requirement already satisfied: pywidevine in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (1.5.2)
    Requirement already satisfied: Unidecode<2.0.0,>=1.3.4 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (1.3.6)
    Requirement already satisfied: lxml>=4.9.1 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (4.9.1)
    Requirement already satisfied: pycryptodome<4.0.0,>=3.15.0 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (3.15.0)
    Requirement already satisfied: requests<3.0.0,>=2.28.1 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (2.28.1)
    Requirement already satisfied: pymp4<2.0.0,>=1.2.0 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (1.2.0)
    Requirement already satisfied: protobuf==4.21.6 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (4.21.6)
    Requirement already satisfied: click<9.0.0,>=8.1.3 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (8.1.3)
    Requirement already satisfied: colorama in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from click<9.0.0,>=8.1.3->pywidevine) (0.4.6)
    Requirement already satisfied: construct==2.8.8 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pymp4<2.0.0,>=1.2.0->pywidevine) (2.8.8)
    Requirement already satisfied: idna<4,>=2.5 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.10)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (1.26.5)
    Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.1.1)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2022.9.24
    That's not an error.

    Run:

    Code:
    pip uninstall pywidevine
    pip install 'pywidevine==1.4.3'
    Quote Quote  
  27. Originally Posted by Diazole View Post
    Originally Posted by Dannyboi View Post

    Python310 doesnt have a space and i deleted the pywidevine folder and tried the cmd pip install pywidevine but getting this error now

    Code:
    Microsoft Windows [Version 10.0.19044.2364]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Users\Maverick>pip install pywidevine
    Requirement already satisfied: pywidevine in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (1.5.2)
    Requirement already satisfied: Unidecode<2.0.0,>=1.3.4 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (1.3.6)
    Requirement already satisfied: lxml>=4.9.1 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (4.9.1)
    Requirement already satisfied: pycryptodome<4.0.0,>=3.15.0 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (3.15.0)
    Requirement already satisfied: requests<3.0.0,>=2.28.1 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (2.28.1)
    Requirement already satisfied: pymp4<2.0.0,>=1.2.0 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (1.2.0)
    Requirement already satisfied: protobuf==4.21.6 in c:\users\Maverick\appdata\roaming\python\python310\site-packages (from pywidevine) (4.21.6)
    Requirement already satisfied: click<9.0.0,>=8.1.3 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pywidevine) (8.1.3)
    Requirement already satisfied: colorama in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from click<9.0.0,>=8.1.3->pywidevine) (0.4.6)
    Requirement already satisfied: construct==2.8.8 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from pymp4<2.0.0,>=1.2.0->pywidevine) (2.8.8)
    Requirement already satisfied: idna<4,>=2.5 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.10)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (1.26.5)
    Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2.1.1)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\Maverick\appdata\local\programs\python\python310\lib\site-packages (from requests<3.0.0,>=2.28.1->pywidevine) (2022.9.24
    That's not an error.

    Run:

    Code:
    pip uninstall pywidevine
    pip install 'pywidevine==1.4.3'
    so i downloaded it from github and added it manually and getting:

    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://cf.jos.c4assets.com/CH4_08_02_900_73860001001001_001/CH4_08_02_900_73860001001001_001_J01.ism/stream.mpd?c3.ri=13504108658373752707&mpd_segment_ template=time&filter=8typeDD2video26688DisplayHeig htED2889668systemBitrateC4800000999CCtype1D2video2 &ts=1672773728&e=600&st=SkDQwuKTllNeol04d_ATccif2i rw2icc9KCOtk-gPHo"
    [!] Failed getting asset ID !!!
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 528, in <module>
    main()
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 460, in main
    asset_id = get_asset_id(url)
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 179, in get_asset_id
    init_data = json.loads(init_data.group(1))
    AttributeError: 'NoneType' object has no attribute 'group'

    C:\Users\Maverick\Desktop\c4-dl-High bitrate>pause
    Press any key to continue . . .


    and this when i tried your way:

    C:\Users\Maverick>pip uninstall pywidevine
    WARNING: Skipping pywidevine as it is not installed.

    C:\Users\Maverick>pip install 'pywidevine==1.4.3'
    ERROR: Invalid requirement: "'pywidevine==1.4.3'"
    Quote Quote  
  28. You've fixed your Crypto and pywidevine errors but now you're providing the script with the wrong URL.

    The URL needs to be the URL of the episode you are trying to DL, e.g.
    Code:
    --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Quote Quote  
  29. Originally Posted by Diazole View Post
    You've fixed your Crypto and pywidevine errors but now you're providing the script with the wrong URL.

    The URL needs to be the URL of the episode you are trying to DL, e.g.
    Code:
    --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    C:\Users\Maverick\Desktop\c4-dl-High bitrate>python .\c4-dl.py --download --wvd "C:\Users\Maverick\Desktop\c4-dl-High bitrate\widevine_device.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
    Traceback (most recent call last):
    File "C:\Users\Maverick\Desktop\c4-dl-High bitrate\c4-dl.py", line 15, in <module>
    from pywidevine.pssh import PSSH
    ModuleNotFoundError: No module named 'pywidevine'

    C:\Users\Maverick\Desktop\c4-dl-High bitrate>pause
    Press any key to continue . . .

    update:

    C:\Users\Maverick\Desktop\all4_new>python .\c4-dl.py --download --url "https://www.channel4.com/programmes/warplane-workshop/on-demand/73860-001"
    usage: c4-dl.py [-h] [--download] [--wvd WVD] [--url URL]

    Channel 4 downloader.

    options:
    -h, --help show this help message and exit
    --download Download the episode
    --wvd WVD The file path to the WVD file generated by pywidevine
    --url URL The URL of the episode to download

    C:\Users\Maverick\Desktop\all4_new>pause
    Press any key to continue . . .
    Quote Quote  
  30. I tried the update and it works for me no problem. Great work!

    Just two things:

    1. Believe it or not, for some shows, the browser manifest actually contains higher bitrate streams than the android device manifest. So, ideally, the script should have a toggle to select either the browser or android manifest rather than ripping the old code out completely. Or even better, it tries both and finds the one with the highest bitrate but that's maybe more work than required. Ultimately, it's not a big deal, a person could just keep the old script lying around but it you make further edits in the future, it could cause a versioning problem.

    2. I found that some shows with very long names caused a file too long problem and crapped out of yt-dlp/aria2c. I think this is partly because you write temporary files to a directory with the full show title and episode name, etc. When I hard coded the output file name to "episode" or something short, it worked no problem. So, a toggle to override the automated naming would be nice. It's not a deal breaker, just an ease of use improvement more than anything else. I'm surprised you never ran into this as some shows have ridiculously long names like "this is the show name: and then this some more text that goes after the colon".

    But overall, thanks for the update!
    Quote Quote  



Similar Threads

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