Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Invalid IPv6 URL When Accessing banned.video #10184

Open
10 of 11 tasks
nullagit opened this issue Jun 14, 2024 · 3 comments
Open
10 of 11 tasks

ERROR: Invalid IPv6 URL When Accessing banned.video #10184

nullagit opened this issue Jun 14, 2024 · 3 comments
Labels
site-bug Issue with a specific website

Comments

@nullagit
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

United States

Provide a description that is worded well enough to be understood

What the problem is:
When attempting to download various videos from banned.video, I received an error: ERROR: Invalid ipv6 URL. Most of the videos I tried to download worked, but a handful of them do not. I am not logged into the site.

How it could be fixed
I'm not sure. I run gentoo and have the -ipv6 USE flag defined globally. There are no ipv6 addresses on this machine and the upstream network/LAN does not support ipv6. The configured kernel doesn't even have ipv6 support. I'm not sure why or how ipv6 is being used at all. I think maybe yt-dlp should force ipv4 when ipv6 isn't an option.

How your proposed solution would look like
Force yt-dlp to continue using the ipv4 address or provide a USE flag that disables IPv6 all together (-ipv6)?

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

sysop@localhost ~ $ yt-dlp -vU https://banned.video/watch?id=5d066d71a90fbc00123c1d34
[debug] Command-line config: ['-vU', 'https://banned.video/watch?id=5d066d71a90fbc00123c1d34']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [12b248ce6]
[debug] Python 3.12.3 (CPython x86_64 64bit) - Linux-6.6.30-gentoo-x86_64-x86_64-AMD_Ryzen_Threadripper_7970X_32-Cores-with-glibc2.39 (OpenSSL 3.0.13 30 Jan 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1
[debug] Optional libraries: certifi-3021.03.16, pycrypto-3.20.0, requests-2.32.1, secretstorage-3.3.3, sqlite3-3.45.3, urllib3-2.2.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1820 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)
[BannedVideo] Extracting URL: https://banned.video/watch?id=5d066d71a90fbc00123c1d34
[BannedVideo] 5d066d71a90fbc00123c1d34: Downloading video metadata
[BannedVideo] 5d066d71a90fbc00123c1d34: Downloading m3u8 information
ERROR: Invalid IPv6 URL
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 1606, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 1741, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 734, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/bannedvideo.py", line 135, in _real_extract
    formats.extend(self._extract_m3u8_formats(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 2014, in _extract_m3u8_formats
    fmts, subs = self._extract_m3u8_formats_and_subtitles(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 2048, in _extract_m3u8_formats_and_subtitles
    return self._parse_m3u8_formats_and_subtitles(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 2197, in _parse_m3u8_formats_and_subtitles
    manifest_url = format_url(line.strip())
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yt_dlp/extractor/common.py", line 2063, in format_url
    return url if re.match(r'^https?://', url) else urllib.parse.urljoin(m3u8_url, url)
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/parse.py", line 551, in urljoin
    urlparse(url, bscheme, allow_fragments)
  File "/usr/lib/python3.12/urllib/parse.py", line 395, in urlparse
    splitresult = urlsplit(url, scheme, allow_fragments)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/parse.py", line 497, in urlsplit
    raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

sysop@localhost ~ $
@nullagit nullagit added site-bug Issue with a specific website triage Untriaged issue labels Jun 14, 2024
@october262
Copy link

october262 commented Jun 16, 2024

right click on the word download and select "copy link address"
and retry downloading the video yt-dlp. "https://download.assets.video/videos/f76d6efa-4a87-4fd8-8da2-5ff359a98703.mp4?direct=true" the video will now download.

@nullagit
Copy link
Author

nullagit commented Jun 16, 2024

Thanks for sharing, you're right, however that's a direct link to the mp4 file itself, I could just use wget instead of yt-dlp in that instance. The reason I'm using yt-dlp is to download the video based off the video page URL instead of drilling down into each individual video page and obtaining the direct link to the mp4. Using yt-dlp to download based off the video page URL makes it easier to download entire categories. Otherwise I'd have to obtain the mp4 link for each individual video myself making yt-dlp unnecessary, since I could simply use wget after obtaining a list of all the mp4 urls.

@barsnick
Copy link
Contributor

or provide a USE flag that disables IPv6 all together (-ipv6)?

How about:

--force-ipv4

Too bad we don't see which URL it is actually trying to parse.

But all that said:
I can reproduce this on an IPv6-enabled machine. Perhaps this is due to the fact that yp-dlp is trying to extract M3U8 formats from an actual MP4 file. I'm just guessing from what I see with --write-pages (also with --force-ipv4):

[BannedVideo] Extracting URL: https://banned.video/watch?id=5d066d71a90fbc00123c1d34                                                                                                                                                          
[BannedVideo] 5d066d71a90fbc00123c1d34: Downloading video metadata                                                                                                                                                                            
[BannedVideo] Saving request to 5d066d71a90fbc00123c1d34_7c9b57034d37641ffaf59e0436ea904e_https_-_api.infowarsmedia.com_graphql.dump                       
[BannedVideo] 5d066d71a90fbc00123c1d34: Downloading m3u8 information
[BannedVideo] Saving request to 5d066d71a90fbc00123c1d34_https_-_download.assets.video_videos_f76d6efa-4a87-4fd8-8da2-5ff359a98703.mp4.dump
ERROR: Invalid IPv6 URL

That last request is an MP4 file, not am M3U8.

@bashonly bashonly removed the triage Untriaged issue label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

4 participants