VideoHelp Forum




+ Reply to Thread
Page 4 of 8
FirstFirst ... 2 3 4 5 6 ... LastLast
Results 91 to 120 of 217
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by stabbedbybrick View Post
    I'm using 0.2.0 on Linux.

    Are you sure you're writing the file as bytes, as in "wb"? It needs to be in its original state or it will fail when muxing.
    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
    Originally Posted by stabbedbybrick View Post
    The documentation for N_m3u8DL-RE isn't the best, but looking through the settings and processors, it does appear that it "fixes" and converts to SRT as default. And I'm assuming it treats imports the same way. But if it doesn't work on your media player then it's not much to do about it other than sticking to what works for you.
    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.
    Quote Quote  
  2. hi i ran the script and encountered an error,
    Code:
     video = data['Playlist']['Video']
                ~~~~^^^^^^^^^^^^
    KeyError: 'Playlist'
    Quote Quote  
  3. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by swappyison View Post
    hi i ran the script and encountered an error,
    It works. Give it proper input and you'll get a proper output. You are on your own.

    Originally Posted by stabbdbybrick View Post
    I'm using 0.2.0 on Linux.

    Are you sure you're writing the file as bytes, as in "wb"? It needs to be in its original state or it will fail when muxing.
    This idiot finally made that change and it works. Thanks.
    Quote Quote  
  4. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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.
    Quote Quote  
  5. 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?
    Quote Quote  
  6. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by tad108 View Post
    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?
    Not sure where you are coming from? All ITVX output is encrypted. So yes it works on DRM protected videos. Stream detector works drm or not. You may need to shift browser-refresh to get TSD to fire up.
    Quote Quote  
  7. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by tad108 View Post
    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?
    Not sure where you are coming from? All ITVX output is encrypted. So yes it works on DRM protected videos. Stream detector works drm or not. You may need to shift browser-refresh to get TSD to fire up.
    I'm confused on how to run the script and where to add the StreamD url?
    Last edited by tad108; 4th Aug 2023 at 20:24.
    Quote Quote  
  8. 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.
    Quote Quote  
  9. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Quote Quote  
  10. 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")
    Quote Quote  
  11. Nice work, @oneohsixx. It's always nice to see people figure stuff out on their own and then share the solution. Keep it up
    Quote Quote  
  12. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by stabbedbybrick View Post
    Nice work, @oneohsixx. It's always nice to see people figure stuff out on their own and then share the solution. Keep it up
    Absolutely. Only the original line is from old code which was replaced differently yesterday. (bytes re-work to get vtt to parse) Always a good idea to make sure you have the latest version.
    Quote Quote  
  13. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by stabbedbybrick View Post
    Nice work, @oneohsixx. It's always nice to see people figure stuff out on their own and then share the solution. Keep it up
    Absolutely. Only the original line is from old code which was replaced differently yesterday. (bytes re-work to get vtt to parse) Always a good idea to make sure you have the latest version.
    Oops, yeah that's always step one.
    Quote Quote  
  14. 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 ��
    Quote Quote  
  15. Originally Posted by A_n_g_e_l_a View Post
    With tongue in cheek I offer an ITVX batch downloader that downloads
    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
    I get only an error:

    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.
    Quote Quote  
  16. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by sebus View Post
    httpx.InvalidURL: Invalid non-printable ASCII character in URL[/CODE]
    try changing line 273 (9 up from the bottom)
    Code:
    url = url.encode('utf-8', 'ignore').decode()
    But the original works on Windows 11.
    Quote Quote  
  17. Originally Posted by ringy9 View Post
    Hi I'm trying to copy @Angela's script and keep getting the following error
    https://files.videohelp.com/u/305113/TSD.png
    https://files.videohelp.com/u/305113/Options.png
    https://files.videohelp.com/u/305113/bestITVX.png

    Hoping someone can help please

    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
    Quote Quote  
  18. Originally Posted by A_n_g_e_l_a View Post
    try changing line 273 (9 up from the bottom)
    Code:
    url = url.encode('utf-8', 'ignore').decode()
    But the original works on Windows 11.
    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.
    Quote Quote  
  19. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    line 273
    Code:
    url = url.encode('utf-8', 'ignore').decode().strip()
    should do it.
    Quote Quote  
  20. Excellent! Indeed it did the trick

    Thanks a lot!
    Quote Quote  
  21. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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
    Leave out the argument S to runs as normal taking your url list.
    Quote Quote  
  22. 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 310in <module>
        
    main()
      
    File "/home/user/Documents/har/itv.py"line 299in main
        myITV
    .download(url)
      
    File "/home/user/Documents/har/itv.py"line 113in download
        video 
    data['Playlist']['Video']
    KeyError'Playlist' 
    Quote Quote  
  23. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Sawyer View Post
    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 310in <module>
        
    main()
      
    File "/home/user/Documents/har/itv.py"line 299in main
        myITV
    .download(url)
      
    File "/home/user/Documents/har/itv.py"line 113in download
        video 
    data['Playlist']['Video']
    KeyError'Playlist' 
    Image
    [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
    Quote Quote  
  24. I have
    HTML Code:
    https://www.itv.com/watch/monster-carp/2a4382/2a4382a0004
    in clipboard, I run
    HTML Code:
    python3 itv.py
    and I see
    HTML Code:
        /  _/ /_  __/ | | / / | |/_/  
       _/ /    / /    | |/ / _>  <    
      /___/   /_/     |___/ /_/|_|    
                                      
    
    Press enter with PAGE urls in clipboard
    What I changed from the script is that I commented these, but it should not affect it right?
    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 
    I'm on Linux Mint
    Quote Quote  
  25. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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.
    Quote Quote  
  26. 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)
    Have looked at why r.json() has error on 226, it's because r.content is the HTML page, not JSON. https://i.imgur.com/y1ttR0I.png
    Looks like the page of the episode.
    Quote Quote  
  27. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Sawyer View Post
    I am on NordVPN, I can watch it in Chrome, when I'm not connected the site does not work at all.
    You are not getting any json returned because you are using a VPN. Read earlier posts - there maybe help there. It is nothing to do with the script.

    Out.
    Quote Quote  
  28. 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-RE
    Last edited by Sawyer; 10th Aug 2023 at 15:27.
    Quote Quote  
  29. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Sawyer View Post
    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-RE
    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
    Quote Quote  



Similar Threads

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