ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.8k stars 9.99k forks source link

File impossible to download - crash python #29094

Open 42-tardis opened 3 years ago

42-tardis commented 3 years ago

Checklist

 [x]  I've checked that all provided URLs are alive and playable in a browser

 [x]  I've verified that I'm running youtube-dl version **2021.05.16**

 [x]  I've searched the bugtracker for similar feature requests including closed ones

Description

$ ~/.local/bin/youtube-dl "https://www.raiplay.it/programmi/wonderland/stagione-2018-2019/puntate" --write-description

Work fine download all files except a single file that is impossible to download

Same error when try to download the single file:

$ ~/.local/bin/youtube-dl "https://www.raiplay.it/video/2020/10/Wonderland-pt2-d9354755-850c-4096-99b4-ff5461109fe1.html" -v

The file is normally download with Video DownloadHelper extension in Firefox 88.0.1 on Linux.

I don't have any idea to solve this, sorry.

Thx :)

LOG

[debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['https://www.raiplay.it/video/2020/10/Wonderland-pt2-d9354755-850c-4096-99b4-ff5461109fe1.html', '-v'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.05.16 [debug] Python version 3.9.5 (CPython) - Linux-5.12.5-arch1-1-x86_64-with-glibc2.33 [debug] exe versions: ffmpeg 4.4, ffprobe 4.4, rtmpdump 2.4 [debug] Proxy map: {} Traceback (most recent call last): File "/home/max/.local/bin/youtube-dl", line 8, in sys.exit(main()) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/init.py", line 475, in main _real_main(argv) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/init.py", line 465, in _real_main retcode = ydl.download(all_urls) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 2068, in download res = self.extract_info( File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 808, in extract_info return self.extract_info(url, ie, download, extra_info, process) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 836, in extract_info ie_result = ie.extract(url) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 534, in extract ie_result = self._real_extract(url) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/rai.py", line 173, in _real_extract relinker_info = self._extract_relinker_info(video['content_url'], video_id) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/rai.py", line 79, in _extract_relinker_info formats.extend(self._extract_m3u8_formats( File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1651, in _extract_m3u8_formats return self._parse_m3u8_formats( File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1771, in _parse_m3u8_formats manifest_url = format_url(line.strip()) File "/home/max/.local/lib/python3.9/site-packages/youtube_dl/extractor/common.py", line 1669, in else compat_urlparse.urljoin(m3u8_url, u)) File "/usr/lib/python3.9/urllib/parse.py", line 534, in urljoin urlparse(url, bscheme, allow_fragments) File "/usr/lib/python3.9/urllib/parse.py", line 393, in urlparse splitresult = urlsplit(url, scheme, allow_fragments) File "/usr/lib/python3.9/urllib/parse.py", line 482, in urlsplit raise ValueError("Invalid IPv6 URL") ValueError: Invalid IPv6 URL

dirkf commented 3 years ago

I get this:

$ youtube-dl -v --ignore-config  'https://www.raiplay.it/video/2020/10/Wonderland-pt2-d9354755-850c-4096-99b4-ff5461109fe1.html'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config', 'https://www.raiplay.it/video/2020/10/Wonderland-pt2-d9354755-850c-4096-99b4-ff5461109fe1.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.05.16
[debug] Python version 3.5.2 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading video JSON
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading XML metadata for platform mon
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading m3u8 information
WARNING: Failed to download m3u8 information: HTTP Error 404: Not Found
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading XML metadata for platform flash
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading f4m manifest
WARNING: Unable to download f4m manifest: HTTP Error 404: Not Found
[RaiPlay] d9354755-850c-4096-99b4-ff5461109fe1: Downloading XML metadata for platform native
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://creativemedia3-rai-it.akamaized.net/podcastcdn/Rai/rai4/Wonderland/13272365_2400.mp4?auth=daEc4aebHcKaBdIbrcBcfdWbCaQbAaic7dp-bGUmV_-c0-GjvvuGt&aifp=V001'
[download] Destination: Wonderland pt.2-d9354755-850c-4096-99b4-ff5461109fe1.mp4
...

The error you're seeing implies that there's a stray [ or ] in the hostname part of the URL, at least checking Python 3.5 urllib.