+ Reply to Thread
Results 151 to 180 of 217
-
This looks an awesome utility and I'm eager to try it, but I get the following error:
zsh: no matches found: https_://itvpnpdotcom.blue.content.itv.com/10-3398-0001-001/34/3/VAR028-HD-s/10-3398-0001-001_34_3_VAR028-HD-s.ism/.mpd?filter=%28%28type%3D%3D%22video%22%26%26Displ ayHeight%3C%3D720%29%7C%7C%28type%21%3D%22video%22 %29%29
[1] + exit 1 python bestitvx.py
I'm try9ing my best to follow the instructions in the first post, but am failing terribly. Would someone be so kind as to try and help me?
Many thanks -
-
Thank you for your response.
yes, I am on a Mac. I can try it on a pc (which I will after responding here) - thanks. I inserted a _ into the URL to prevent it from converting to a live hyperlink - apologies.
The parent page is - https://www.itv.com/watch/the-real-spies-among-friends/10a3398 -
Just tried it in windows, and got a different error:
C:\...\Downloads>python bestITVX.py https://itvpnpdotcom.blue.content.itv.com/10-3398-0001-001/34/3/VAR028-HD-s/10-3398-00...2video266Displ ayHeightCD7209CC8type1D2video2 99
Traceback (most recent call last):
File "C:\...\Downloads\bestITVX.py", line 48, in <module>
import httpx
ModuleNotFoundError: No module named 'httpx'
C:\...\Downloads> -
Cheers... now a new error, though
C:\Users\burra\Downloads>python bestITVX.py https://itvpnpdotcom.blue.content.itv.com/10-3398-0001-001/34/3/VAR028-HD-s/10-3398-00...2video266Displ ayHeightCD7209CC8type1D2video2 99
Traceback (most recent call last):
File "C:\Users\burra\Downloads\bestITVX.py", line 50, in <module>
from selectolax.lexbor import LexborHTMLParser
ModuleNotFoundError: No module named 'selectolax' -
OK I make the assumption that python users of my scripts know that will likely need to import some libraries of 'modules 'to run, if they are not already on the system.
It's easy when you know how. Any new script will complain if it cannot find the library; you will need to download it.
Python has a module call pip which will do the downloading.
Code:pip install httpx
Code:python3 -m pip install httpx
Now you can do that, the program will repeatedly stop until all the missing modules are all downloaded.
You will need to pip install these to
selectolax
pyperclip
pyfiglet
termcolor
possibly more depending on the CDM or no CDM usage but just respond to the the error messages as above
I looked up your original error. It appears to be a Mac thing with the system expecting quotes around urls or some characters in the the url escaped with a '/'.
try inserting this line after line 174
Code:mpd_url = "\"" + mpd_url + "\""
See if that works.
EDIT Took too long writing this that others answered! -
Thank you so much. I have installed the other modules and managed to run the script. New error, unfortunately.
C:\Users\burra\Downloads>python bestITVX.py https://itvpnpdotcom.blue.content.itv.com/10-3398-0001-001/34/3/VAR028-HD-s/10-3398-00...2video266Displ ayHeightCD7209CC8type1D2video2 99
←[32m ____ ______ _ __ _ __
/ _/ /_ __/ | | / / | |/_/
_/ / / / | |/ / _> <
/___/ /_/ |___/ /_/|_|
←[0m
Press enter with PAGE urls in clipboard
The URL list has 1 video(s)
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
yield
File "C:\Python311\Lib\site-packages\httpx\_transports\default.py", line 218, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpcore\_sync\connection_pool.py", line 214, in handle_request
raise UnsupportedProtocol(
httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\burra\Downloads\bestITVX.py", line 388, in <module>
main()
File "C:\Users\burra\Downloads\bestITVX.py", line 378, in main
myITV.download(url)
File "C:\Users\burra\Downloads\bestITVX.py", line 125, in download
title, data = self.get_data(url)
^^^^^^^^^^^^^^^^^^
File "C:\Users\burra\Downloads\bestITVX.py", line 251, in get_data
r = self.client.get(url)
^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 1041, in get
return self.request(
^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 814, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 901, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 929, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 966, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_client.py", line 1002, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_transports\default.py", line 217, in handle_request
with map_httpcore_exceptions():
File "C:\Python311\Lib\contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Python311\Lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
C:\Users\burra\Downloads> -
You appear to be feeding an mpd to the script? I should have connected the dots in your first post.
Use the page url - the script finds both mpd and license itself. And try using PowerShell - you'll get a better experience
[Attachment 73371 - Click to enlarge]
You never would have guessed!Last edited by A_n_g_e_l_a; 24th Aug 2023 at 06:46.
-
New error
C:\Users\burra\Downloads>python bestITVX.py https://www.itv.com/watch/the-real-spies-among-friends/10a3398
←[32m ____ ______ _ __ _ __
/ _/ /_ __/ | | / / | |/_/
_/ / / / | |/ / _> <
/___/ /_/ |___/ /_/|_|
←[0m
Press enter with PAGE urls in clipboard
The URL list has 1 video(s)
Traceback (most recent call last):
File "C:\Users\burra\Downloads\bestITVX.py", line 388, in <module>
main()
File "C:\Users\burra\Downloads\bestITVX.py", line 378, in main
myITV.download(url)
File "C:\Users\burra\Downloads\bestITVX.py", line 125, in download
title, data = self.get_data(url)
^^^^^^^^^^^^^^^^^^
File "C:\Users\burra\Downloads\bestITVX.py", line 276, in get_data
return title, r.json()
^^^^^^^^
File "C:\Python311\Lib\site-packages\httpx\_models.py", line 755, in json
return jsonlib.loads(self.content.decode(encoding), **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
File "C:\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
C:\Users\burra\Downloads> -
[Attachment 73375 - Click to enlarge]
Works for me. Error suggests you've got no response to a request. Are you needing to use a VPN or are you in the UK?
Ensure you have the latest script update at #1Last edited by A_n_g_e_l_a; 24th Aug 2023 at 07:25.
-
let me do some tweaking... my windows machine is a RDC connection and behind a VPN. D'oh! Great catch!
-
ok... next error (I'm so sorry about all this)
Press enter with PAGE urls in clipboard
The URL list has 1 video(s)
The_Real_Spies_Among_Friends
C:\Python311\python.exe: No module named pysubs2
Using a remote CDM
Keys found 7bd5ebb3e0cd41f0989685b5f0dd56f4:f0ac4c1cea55b141c 865b2964f961784
Traceback (most recent call last):
File "C:\Users\burra\Downloads\bestITVX.py", line 388, in <module>
main()
File "C:\Users\burra\Downloads\bestITVX.py", line 378, in main
myITV.download(url)
File "C:\Users\burra\Downloads\bestITVX.py", line 186, in download
subprocess.run([
File "C:\Python311\Lib\subprocess.py", line 546, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 1022, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python311\Lib\subprocess.py", line 1491, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
C:\Users\burra\Downloads> -
Last edited by A_n_g_e_l_a; 24th Aug 2023 at 08:40.
-
I don't program - at all - so this is going to be painful. I see a few sub-processes (I think):
m3u8dl,
mpd_url,
cookie,
f'host
f'user-agent
myvideoname,
key,
subs
am I getting warm? Not a clue with where to go from here... -
OK... new error (after installing the subtitles module)
File "C:\Python311\Lib\site-packages\hyperframe\flags.py", line 14, in <module>
class Flags(collections.MutableSet):
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'MutableSet' -
There is only one subprocess, it is a program name followed by many parameters. The program name is a short form and the full form is given 5 line before the subprocess-call - N_m3u8DL-RE. Now you are going to ask where do I get that from?
And I say. We shouldn't be starting from here. Credit limit reached. -
Your guide didn't give any indication that there were dependencies - so I'm stumbling through the error messages as best I can - AND I appreciate the help.
-
I finally managed to get the file. Turns out it was a version issue with Python. I was on v 3.11 and the error was related to a function/somthing in the code that had been depreciated... I rolled back to version 3.9 and it downloaded fine!
this was the page I read that fixed it for me:
"In python 3.10 MutableSequence was removed from collections in favor of collections.abc
Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9." -
That is because its intended audience is experienced script users - long term members of this forum - who would already have the requisite support software on their systems.
There has to be a starting point. No reflection on yourself; you just been learning something else. I choose to start with the assumption that users already are able to download and decrypt video by hand. After all it is what this forum is about.
I have posts in the stickies explaining the processes used for downloading encrypted video. N_m3u8DL-RE is given time and place.
So expecting you to have the necessary system set-up is hardly unreasonable. -
Well in any case, I thought I'd share the fix I used - just in case you found it of any use for future support questions.
-
-
Code removed. Too much of my time taken up supporting novices.
No good deed goes unpunished -
Rather naively I thought I wanted to democratize decryption for the masses. So I posted code that had three ways of getting keys; Pywidvine, WKS-KEYS, or a remote service. The remote service gave anyone, who dropped in from Google, the ability to be able to download from ITVX or UKTVPlay, without much fuss.
Only, I now realise, those Googlers hadn't spent any time downloading, getting keys and decrypting by hand, so didn't have the tools, nor any experience running scripts.
But they arrive, wave after wave, with huge expectations via a search engine.
Having had time to relfect, I have removed the remote service option and re-posted the script. Users will need a CDM so (hopefully) will have done the preparatory work and have a suitable system on which to run code. -
A nice way to think about it, is that most people that are using your scripts successfully won't give any feedback. For every Dannyboi, there's probably loads of people who're quietly using your scripts without issues.
But yes, posting your stuff publicly will certainly test your patience. You could write a program that would download everything at the press of a button, and someone would eventually find a way to press it the wrong way.
Nice to see you decided to re-post it, though! This place wouldn't be the same without your scripts -
Similar Threads
-
Crash course on downloading ITVx hub please?
By adrian44 in forum Video Streaming DownloadingReplies: 301Last Post: 30th Jan 2025, 08:16 -
ITVX & Error 403
By PhilipG in forum Video Streaming DownloadingReplies: 14Last Post: 20th May 2023, 02:39 -
Portable Windows Video DownLoader & SubTitles?
By TEH in forum Video Streaming DownloadingReplies: 4Last Post: 21st Jul 2022, 11:41 -
4K-Video-Downloader and playlist subtitles
By ChasVideo in forum Video Streaming DownloadingReplies: 0Last Post: 11th Sep 2020, 05:49 -
Using TV downloader
By frankopstaele in forum Newbie / General discussionsReplies: 0Last Post: 2nd Feb 2019, 18:44