It is as downloaded from ITVX. I've just tried the script on a Windows 11 Virtual Machine and the vtt subs work as expected! So looks possibly like my linux python version
Yes, saw that so tried --sub-format=VTT but it didn't like that at all.
But for me srt it is good. And, for windows punters, they can get vtt subs with an edit to the script. Thanks for the heads-up.
+ Reply to Thread
Results 91 to 120 of 217
-
-
hi i ran the script and encountered an error,
Code:video = data['Playlist']['Video'] ~~~~^^^^^^^^^^^^ KeyError: 'Playlist'
-
-
An update at post 1 reflects the recent changes above. Fully working on Windows 11 using PowerShell
Last edited by A_n_g_e_l_a; 4th Aug 2023 at 06:08.
-
awww that's great
please tell me it works on DRM protected videos as well!? I'm trying to download drm videos with subs but no luck, even with the Stream Detector, which works for non-drm or am I wrong?
-
-
Last edited by tad108; 4th Aug 2023 at 20:24.
-
hi this is a fantastic script and i have learned so much from looking through all the different posts here , so big thanks to all the contributers.. ive got this script working with my own cdn dumped from android and it works great .. there is a small issue im facing though.. For example on itvx the TV series Men Behaving Badly it downloads episodes 1 and 2 no issue, and more in the series. but for episode 3 im getting an error.. this is the url https://www.itv.com/watch/men-behaving-badly/10a0549/10a0549a0003 and this is the error im facing
UnicodeEncodeError: 'charmap' codec can't encode character '\x99' in position 33586: character maps to <undefined>
Could someone possibly try with the same episode and see if it works for them and advise me on what part of the script i can play with to get past the error?
Any help will be greatly appreciated. -
i actually sorted it out while waiting for the post to be approved.. if any one else faces the same issue i fixed it by adding , encoding="utf-8" to one of the lines.. making this line
f = open(f"{videoname}.subs.vtt", "w" , encoding="utf-8") -
Nice work, @oneohsixx. It's always nice to see people figure stuff out on their own and then share the solution. Keep it up
-
-
ahh my mistake.. i grabbed an update in the morning, must have missed the later one. the updated code works fine .. that will teach me to double check
-
That is one good downloader!
On Windows, I can do perfectly one by one, but if copy to clipboard more than 1 URL, ie
Code:https://www.itv.com/watch/supernatural/34139/1a7454a0162 https://www.itv.com/watch/supernatural/34139/1a7454a0162
Code:The URL list has 2 video(s) Traceback (most recent call last): File "c:\temp\bestITVX.py", line 280, in <module> main() File "c:\temp\bestITVX.py", line 274, in main myITV.download(url) File "c:\temp\bestITVX.py", line 97, in download title, data = self.get_data(url) ^^^^^^^^^^^^^^^^^^ File "c:\temp\bestITVX.py", line 186, in get_data r = self.client.get(url) ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 1041, in get return self.request( ^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 801, in request request = self.build_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 346, in build_request url = self._merge_url(url) ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 376, in _merge_url merge_url = URL(url) ^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_urls.py", line 113, in __init__ self._uri_reference = urlparse(url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_urlparse.py", line 160, in urlparse raise InvalidURL("Invalid non-printable ASCII character in URL") httpx.InvalidURL: Invalid non-printable ASCII character in URL
Last edited by sebus; 7th Aug 2023 at 14:03.
-
-
Getting thr same with Stream Detector extension in Chrome
Copy Visible URL only copies: https://www.itv.com
If one (righ-click) copy the mpd, it is:
https://itvpnpdotcom.blue.content.itv.com/1-7454-0164-001/34/1/VAR028-HD-s/1-7454-0164...6d8f683bc10ca9
and the script chokes on it -
Server 2019, Python 3.11.4, changed the line, still fails:
Code:The URL list has 9 video(s) Traceback (most recent call last): File "C:\temp\bestITVX.py", line 281, in <module> main() File "C:\temp\bestITVX.py", line 275, in main myITV.download(url) File "C:\temp\bestITVX.py", line 97, in download title, data = self.get_data(url) ^^^^^^^^^^^^^^^^^^ File "C:\temp\bestITVX.py", line 186, in get_data r = self.client.get(url) ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 1041, in get return self.request( ^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 801, in request request = self.build_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 346, in build_request url = self._merge_url(url) ^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_client.py", line 376, in _merge_url merge_url = URL(url) ^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_urls.py", line 113, in __init__ self._uri_reference = urlparse(url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python\Python311\Lib\site-packages\httpx\_urlparse.py", line 160, in urlparse raise InvalidURL("Invalid non-printable ASCII character in URL") httpx.InvalidURL: Invalid non-printable ASCII character in URL
Code:https://www.itv.com/watch/supernatural/34139/1a7454a0173 https://www.itv.com/watch/supernatural/34139/1a7454a0174 https://www.itv.com/watch/supernatural/34139/1a7454a0175 https://www.itv.com/watch/supernatural/34139/1a7454a0176 https://www.itv.com/watch/supernatural/34139/1a7454a0177 https://www.itv.com/watch/supernatural/34139/1a7454a0178 https://www.itv.com/watch/supernatural/34139/1a7454a0179 https://www.itv.com/watch/supernatural/34139/1a7454a0180 https://www.itv.com/watch/supernatural/34139/1a7454a0181
Last edited by sebus; 7th Aug 2023 at 14:04.
-
line 273
Code:url = url.encode('utf-8', 'ignore').decode().strip()
-
I've added an experimental update to allow for series downloading from a single url. Given the first episode url in a series and the number of episodes, the software creates a sequence of urls with incrementing digits. It appears to work over each series I have tried: Supernatural, A Confession and Vanishing Act. Be careful to select the first video in a series url and not the general series url. Only attempt 1 series at a time. The urls are not sequential over many series.
Call the program using S as an argument.
Code:python bestITVX.py S
-
Can I have some help?
PHP Code:python3 itv.py S
____ ______ _ __ _ __
/ _/ /_ __/ | | / / | |/_/
_/ / / / | |/ / _> <
/___/ /_/ |___/ /_/|_|
Provide episode link for first video in a SERIES as direct input
Start URL https://www.itv.com/watch/monster-carp/2a4382/2a4382a0004
Number of episodes 1
Traceback (most recent call last):
File "/home/user/Documents/har/itv.py", line 310, in <module>
main()
File "/home/user/Documents/har/itv.py", line 299, in main
myITV.download(url)
File "/home/user/Documents/har/itv.py", line 113, in download
video = data['Playlist']['Video']
KeyError: 'Playlist'
-
[Attachment 73092 - Click to enlarge]
Tested working on Linux and Windows.
(Note the series down-loader will download 4 fishing videos for 'series 1' but the episode ids are not sequential. So some of series and 2 were downloaded.
But since you only asked for one video, have the link in the clipboard and start bestITVX.py (in your case itv.py) as below.
Code:python3 itv.py
-
I have
HTML Code:https://www.itv.com/watch/monster-carp/2a4382/2a4382a0004
HTML Code:python3 itv.py
HTML Code:/ _/ /_ __/ | | / / | |/_/ _/ / / / | |/ / _> < /___/ /_/ |___/ /_/|_| Press enter with PAGE urls in clipboard
PHP Code:# from pywidevine.L3.cdm import deviceconfig # no CDM? Comment out this line
# from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt # no CDM? Comment out this line
-
The error you have suggests the code isn't getting the response it expects. One of the ways that can happen is with you not being in the UK.
I cannot reproduce your error with that url, so am unable to help. -
I am on NordVPN, I can watch it in Chrome, when I'm not connected the site does not work at all.
HTML Code:Provide episode link for first video in a SERIES as direct input Start URL https://www.itv.com/watch/monster-carp/2a4382/2a4382a0004 Number of episodes 2 Traceback (most recent call last): File "/home/alex/Documents/har/itv.py", line 315, in <module> main() File "/home/alex/Documents/har/itv.py", line 304, in main myITV.download(url) File "/home/alex/Documents/har/itv.py", line 113, in download title, data = self.get_data(url) File "/home/alex/Documents/har/itv.py", line 226, in get_data return title, r.json() File "/home/alex/.local/lib/python3.10/site-packages/httpx/_models.py", line 755, in json return jsonlib.loads(self.content.decode(encoding), **kwargs) File "/usr/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/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)
Looks like the page of the episode. -
-
Nothing about how to make it work through proxy. Maybe it should be in the first post so people know from the start that it does not work.
// Really sucks that it works in browsers but not through N_m3u8DL-RELast edited by Sawyer; 10th Aug 2023 at 15:27.
-
And how do I, a UK resident, test that? And why would I need to, when it works fine for its intended audience?
The issue is yours and yours alone. Hint: you might need to downgrade the TLS security level on your system to 2. and not use TLS3. Or buy access to a machine instance located in the UK
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