First off thank you to everyone who was kind and patient and helped me get a grasp on how to use N_m3u8DL-RE to download some videos from TubiTV.
https://forum.videohelp.com/threads/410007-N_m3u8DL-RE-Giving-It-A-Try
It may be beyond my capabilities to be able to work with Python Scripts and I have looked over the threads and searched Google and it gets confusing. But lets start and hopefully things work out.
Whether I get a grasp on all this thank you to stabbedbybrink for the scripts you came up with and I am sure many people are using them and grateful for all the work you put into it.
https://forum.videohelp.com/threads/410896-CTV-ca-downloader-%28up-to-1080p%29
https://github.com/stabbedbybrick/freevine
I take it that I install the Python 3.7 and make sure I select the option to "PATH" and "allow more than characters". I will go and do that later this evening on my Windows 11 mini computer.
I do have a Folder on my Desktop for N_m3u8DL-RE and I have FFMPEG and Shaka Packager in there already. I know I need to understand "freevine folder" and "Local pywidevine module" and how to get that and what else is required. But I better get Python 3.7 installed first and then ask for some directions beyond that.
Thank you advance and thank you in advance for others who might learn through this thread.
A thought for quite a spell YT-DLP couldn't download from CBC. Thankfully someone who posts here at VideoHelp came up with a method to do so again and eventually it got included in a newer version of YT-DLP. So was what that person made a python script that got built into the YT-DLP program to be called on when wants to get a video from CBC?
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 30 of 54
-
Last edited by Tom Saurus; 29th Aug 2023 at 17:41.
-
I wonder if I should follow this guy's advice when it comes to installing python:
https://www.youtube.com/watch?v=28eLP22SMTA
He says it is wise to put python inside a virtual environment because over time things end up broken as one installs this and that in relation to python. -
It reads Python 3.7+ so does that mean one needs 3.7 minimum but one can go with the latest Python version?
-
https://www.google.com/search?q=which+python+should+I+install&sca_esv=561326209&sxsrf=...bih=1083&dpr=2
Note 'past year' search option!! -
Thank you for your response.
I finally got around to downloading Python 3.11. I created a restore point first just in case. I have made a new folder on my Desktop entitled "Python Script Downloader". I copied FFMPEG into that folder along with Shaka Packager and N_m3u8DL-RE.
The requirement for the python downloaders have changed to include "Working L3 CDM (key and blob)". I am still working on getting mkvmerge and mp4decrypt. I downloaded mkvtoolnix which seems to be the only way to get mkvmerge. I will have to figure out how to do these things. Thanks in advance for advice and it is probably going to take me quite a while to get this figured out even with help.
I am thinking at the end of the day perhaps once one gets all the tools required you either launch python and call up N_m3u8DL-Re from that or the other way around you launch N-m3u8DL-Re by the command line, type in the a prepared line of python code with the appropriate url and then you select what quality you want perhaps 480p and you get the files you want at the end.
I better get some money set aside to buy Tubedigger as this here may be way beyond my skills. I was a bit depressed and out of sorts the other day so I gave up on this thread and this attempt on getting a grasp on what to do. -
mkvmerge
mp4decrypt
and 2 x L3 CDMs
https://files.videohelp.com/u/303646/DownloaderFiles.zip
at this rate it'll take you years to find out how this works and it's always a shame when people give up instead of pushing through. This should be a gentle push in the right direction.
Honestly it's not that hard once you get your head around it, you just need to understand the mechanic that's happening.
Downloading is really straightforward:
feed N_m3u8DL-RE an MPD/m3u8 URL, it will show you the possible resolutions and you select what you want to download, it does the rest for you. When DRM is involved, you can tell it to use shaka or mp4decrypt to decrypt the downloaded files, using a key you also provide it.
This key can be found by basically mimicing the license request that happens when you want to play a video in your browser. The more you look into it, the easier you'll spot the right requests in the network developer console.
Very simply said, what happens when requesting a key, is this:
1. you "wave" at the license server
2. the server acknowledges you are there and replies to your wave with a certificate
3. You receive that certificate and your CDM knows how to "translate" that certificate into a challenge
4. You send the challenge back to the license server, the license server now knows and realized that you are "authorized" to receive the secret it can send you
5. The license server sends back the secret
6. Your CDM knows how to translate the secret it received into a readable kid:key
THIS IS VERY BASIC AND VERY VERY VERY SIMPLIFIED but it's more or less what's happening. The thing you need to figure out (and it will be different for every license server) is what you have to send to it, along with the wave and the challenge. This could be headers, a payload, ... -
Karoolus: Thank you for your post. Believe it or not I did grasp N_m3u8DL-RE on getting unencrypted videos over at Tubi TV thanks to some help here and I still can get that accomplished as it was a matter of saving a text file with the correct directions for the program to get the video. It was just a matter of getting the main manifest and copying that to be placed between quotation marks. I also learned and will have relearn as I am rusty now where I would get everything needed to input into the now gone "CDRM Project" where I could get the keys and then input that into some saved text that I would paste over in N_m3u8DL-RE. I didn't bother to work with mp4decrypt as I used Shaka Packager so I didn't learn mp4decrypt. Then came the end of CDRM Project and thus reading about the scripts and what could be accomplished with them but in the end if I could in fact really learn it would be better for me to have that skill set.
I downloaded what you provided and I have unzipped and copied those files to my Python Downloaders Folder on the Desktop.
This is the thread where I learned how to get a grasp on N_m3u8DL-RE:
https://forum.videohelp.com/threads/410007-N_m3u8DL-RE-Giving-It-A-Try
I have tried CTV in the past but it is quite a complex site and for me the Developer Tools didn't reveal as much as it did with Tubi TV.
I should at least give all this another try. Thank you for your post. I of course am grateful for all the help I can get.
So I take it that with these tools I put in the folder it would possible for me to get "Kingdom Of The Spiders" from TubiTV which I think is encrypted. I better get some practice in unencrypted files again to make sure I haven't lost that skill and then do all that I can do to get refreshed on encrypted videos. I better do some reading of my thread again. It is amazing how fast these skills become fuzzy when you don't practice them often enough.
Back to the scripts I have to read things over again as I remember I was to use PIP to get certain code to enable them. I suppose I buck the trend being happy with 480p as opposed to higher resolutions. I only have so much money to invest in hard drives to store videos and to me I have no 4K or 8K TVs so it hasn't resulted in a desire to have such huge files. -
I went back and read ElCap's post to refresh my memory on how to get PSSH and License:
https://forum.videohelp.com/threads/410007-N_m3u8DL-RE-Giving-It-A-Try#post2695560
It is so easy to forget this kind of thing when you are not getting your practice in. So with CDRM project gone what I would have to grasp is where to go with PSSH and License and how to input that into something to show the keys separated by a colon that one inputs into N_m3u8DL-RE.
For "Kingdom Of The Spiders" I found this PSSH:
AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEGHAyX z6jUTKk9fPlBCgrftI49yVmwY=
And This License:
https://license.adrise.tv/challenge?platform=web&type=widevine_nonclearlead&external_i...ulRu1HhVJvkYEQ
I was just exploring a little bit in the License tabs there is one called Payload, ect. -
Code:
61c0c97cfa8d44ca93d7cf9410a0adfb:9f2d6809b0d9dd7ad93eaa95f0b1964b
https://files.videohelp.com/u/303646/WKS-KEYS.zip -
The keys worked. Now to learn how to input into WKS-KEYS for future use. So far I gather one goes to that WKS-KEY Folder go up to the address line and type in CMD to get the command prompt. Thank you Karoolus.
I don't mind the effort put into digging around for PSSH and License as it is kind of fun in its own way. I need to know how to input such data into WKS-Keys for it to spit out the KID and the KEY that I can then use to feed into N_m3u8DL-RE.
Thank you in advance for any advice I receive to accomplish such a task. -
I hope others can learn along with me. It has been very kind of other posters to take the time to show the way.
-
Back to the scripts for CTV, TUBI, ect. I am getting a bit of sense of how it works. One could direct it to gets episode 1 -13 of a show, at perhaps 480p and whether it is encrypted or not it automates what you would manually do by one file at a time. That is quite extraordinary and useful.
So thus far I have Python and a folder on my Desktop with N_m3u8DL-RE, mkvmerge, mp4decrypt, Shaka Packer, 2 and L3 Folders. I don't know if I should copy anything in from the WKS-KEYS Folder but it would seem that I need to go the desktop folder launch cmd, call up Py then do something with the requirements .txt file which I installs some PIP programs. Then eventually I can use the scripts. I think I will take a break my brain is hurting. -
I went to the WKS-KEYS Folder. I typed CMD into the address bar.
Then I did this with the PSSH and the License:
C:\Users\\Downloads\WKS-KEYS>[AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEGHAyX z6jUTKk9fPlBCgrftI49yVmwY=] py l3.py[\https://license.adrise.tv/challenge?platform=web&type=widevine_nonclearlead&external_i...lRu1HhVJvkYEQ]
'[AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEGHAyX ' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the file specified.
'external_id' is not recognized as an internal or external command,
operable program or batch file.
'drm_token' is not recognized as an internal or external command,
operable program or batch file.
Obviously as a wise bunny once said "I took a wrong turn at Alberkurke". But I can try again and forgive me for being so dense. -
C:\Users\\Downloads\WKS-KEYS>py l3.py
Traceback (most recent call last):
File "C:\Users\\Downloads\WKS-KEYS\l3.py", line 10, in <module>
import base64, requests, sys, xmltodict
ModuleNotFoundError: No module named 'requests' -
-
PS C:\Users\\Downloads\WKS-KEYS> pip install requests
Collecting requests
Obtaining dependency information for requests from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6...y.whl.metadata
Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting charset-normalizer<4,>=2 (from requests)
Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/91/6e/db0e545302bf93b6dbbdc496dd192c7f8e8c3bb1...4.whl.metadata
Downloading charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl.metadata (31 kB)
Collecting idna<4,>=2.5 (from requests)
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 827.4 kB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1 (from requests)
Obtaining dependency information for urllib3<3,>=1.21.1 from https://files.pythonhosted.org/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03...y.whl.metadata
Downloading urllib3-2.0.4-py3-none-any.whl.metadata (6.6 kB)
Collecting certifi>=2017.4.17 (from requests)
Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e...y.whl.metadata
Downloading certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 1.1 MB/s eta 0:00:00
Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 1.1 MB/s eta 0:00:00
Downloading charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 928.1 kB/s eta 0:00:00
Downloading urllib3-2.0.4-py3-none-any.whl (123 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.9/123.9 kB 806.2 kB/s eta 0:00:00
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
Successfully installed certifi-2023.7.22 charset-normalizer-3.2.0 idna-3.4 requests-2.31.0 urllib3-2.0.4
PS C:\Users\\Downloads\WKS-KEYS> py l3.py
Traceback (most recent call last):
File "C:\Users\\Downloads\WKS-KEYS\l3.py", line 10, in <module>
import base64, requests, sys, xmltodict
ModuleNotFoundError: No module named 'xmltodict'
PS C:\Users\\Downloads\WKS-KEYS> -
-
I tried this:
PS C:\Users\\Downloads\WKS-KEYS> pip install base64
ERROR: Could not find a version that satisfies the requirement base64 (from versions: none)
ERROR: No matching distribution found for base64
PS C:\Users\sheld\Downloads\WKS-KEYS> -
I typed this and prayed and it seems to installed:
PS C:\Users\\Downloads\WKS-KEYS> pip install "xmltodict"
Collecting xmltodict
Downloading xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Installing collected packages: xmltodict
Successfully installed xmltodict-0.13.0
PS C:\Users\sheld\Downloads\WKS-KEYS>
Thank you so now I should do the same for Base64.
I just tried it failed on that.
PS C:\Users\\Downloads\WKS-KEYS> pip install "base64"
ERROR: Could not find a version that satisfies the requirement base64 (from versions: none)
ERROR: No matching distribution found for base64
PS C:\Users\\Downloads\WKS-KEYS> -
PS C:\Users\\Downloads\WKS-KEYS> pip install "sys"
ERROR: Could not find a version that satisfies the requirement sys (from versions: none)
ERROR: No matching distribution found for sys
PS C:\Users\\Downloads\WKS-KEYS> -
PS C:\Users\\Downloads\WKS-KEYS> py l3.py
Traceback (most recent call last):
File "C:\Users\\Downloads\WKS-KEYS\l3.py", line 13, in <module>
import pyperclip
ModuleNotFoundError: No module named 'pyperclip'
PS C:\Users\\Downloads\WKS-KEYS> import "pyperclip"
import : The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ import "pyperclip"
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\\Downloads\WKS-KEYS> pip install "pyperclip"
Collecting pyperclip
Downloading pyperclip-1.8.2.tar.gz (20 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyperclip
Building wheel for pyperclip (pyproject.toml) ... done
Created wheel for pyperclip: filename=pyperclip-1.8.2-py3-none-any.whl size=11136 sha256=edbf092047fe19eade6f6bf1372635bda52f1d156c8 f2794c30d79544c98e6be
Stored in directory: c:\users\\appdata\local\pip\cache\wheels\70\bd\ba\ 8ae5c080c895c9360fe6e153acda2dee82527374467eae061b
Successfully built pyperclip
Installing collected packages: pyperclip
Successfully installed pyperclip-1.8.2
PS C:\Users\\Downloads\WKS-KEYS> pip install "base64"
ERROR: Could not find a version that satisfies the requirement base64 (from versions: none)
ERROR: No matching distribution found for base64
PS C:\Users\\Downloads\WKS-KEYS> py 13.py
C:\Users\\AppData\Local\Programs\Python\Python311\ python.exe: can't open file 'C:\\Users\\\\Downloads\\WKS-KEYS\\13.py': [Errno 2] No such file or directory
PS C:\Users\\Downloads\WKS-KEYS> py l3.py
Traceback (most recent call last):
File "C:\Users\\Downloads\WKS-KEYS\l3.py", line 14, in <module>
from pywidevine.L3.cdm import cdm, deviceconfig
File "C:\Users\\Downloads\WKS-KEYS\pywidevine\L3\cdm\cdm.py", line 7, in <module>
from google.protobuf.message import DecodeError
ModuleNotFoundError: No module named 'google'
PS C:\Users\sheld\Downloads\WKS-KEYS>
I did all this. I am suspecting that I may have went down a rabbit hole and I going to end up finding Amelia Airheart and Jimmy Hoffa somewhere embedded in python code before I all is said and done. -
I installed pip everything under the sun and prayed and I got a line saying PSSH:
I hate wasting prayers on such things but I've done it now. Thank you and I am going to try this out. -
Karoolus: Thank you it looks like it is working. It just finished and I checked it and it worked.
-
Now that I have got WKS-KEYS working thanks to Karoolus and Gwe202:
When it comes to CTV Python Downloader and the other Python Downloaders I think I have all the dependencies via pip the scripts themselves are they to be saved as .txt files in the folder or am I way off the reservation in thinking that. Thanks in advance as I continue to learn.
Similar Threads
-
N_m3u8DL-RE on Mac
By phineferb98 in forum Video Streaming DownloadingReplies: 19Last Post: 17th Dec 2024, 13:15 -
N_m3u8DL-RE: Giving It A Try
By Tom Saurus in forum Video Streaming DownloadingReplies: 104Last Post: 10th Dec 2024, 08:17 -
N_m3u8DL-RE and quick questions
By euphonic in forum Video Streaming DownloadingReplies: 30Last Post: 8th Aug 2023, 11:39 -
Help with N_m3u8DL-RE and MPD
By sparklescale in forum Video Streaming DownloadingReplies: 4Last Post: 20th Jun 2023, 23:31 -
N_m3u8DL-RE subtitle
By ahmedani in forum Video Streaming DownloadingReplies: 4Last Post: 7th Dec 2022, 09:30