yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
91.04k stars 7.07k forks source link

[youtube:tab] HTTP Error 404: Not Found for some YouTube channels due to YouTube weirdness #10957

Open HGStyle opened 2 months ago

HGStyle commented 2 months ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Region

France

Provide a description that is worded well enough to be understood

Some channels on YouTube redirects to old & unsupported links (i.e. https://youtube.com/username instead of https://youtube.com/@username). This bug is not specific to YT-DLP, in fact, opening a bugged YouTube channel directly from the link won't work and show the 404 Not Found error page because you got redirected to the wrong page. However, by searching on YouTube the channel name and clicking the the person's name, its the same exact URL but you are able to load the page without getting redirected. Seems really weird, IDK why it happens. I am not using any credentials inside YT-DLP, and the bug happens both in Brave browser while logged in and Brave browser while not logged in (inside a private window).

Example URL (won't work if you click on it, but search "ZimnyteGD" on YouTube and click on the profile to get the actual user page without the weird bug): https://www.youtube.com/@ZimnyteGD The bug also happens when giving a specific tab, i.e. https://www.youtube.com/@ZimnyteGD**/videos**

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

py3 -m yt_dlp -f bestvideo+bestaudio https://youtube.com/@ZimnyteGD/videos --embed-subs --embed-thumbnail --embed-metadata --embed-chapters --embed-info-json -vU
[debug] Command-line config: ['-f', 'bestvideo+bestaudio', 'https://youtube.com/@ZimnyteGD/videos', '--embed-subs', '--embed-thumbnail', '--embed-metadata', '--embed-chapters', '--embed-info-json', '-vU']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.08.06 from yt-dlp/yt-dlp [4d9231208] (pip)
[debug] Python 3.11.8 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 3.0.13 30 Jan 2024)
[debug] exe versions: ffmpeg N-116911-gc0666d8bed-20240907 (setts), ffprobe N-116911-gc0666d8bed-20240907
[debug] Optional libraries: Cryptodome-3.19.1, brotli-1.1.0, certifi-2024.02.02, mutagen-1.47.0, requests-2.32.3, sqlite3-3.43.1, urllib3-1.26.18, websockets-13.0.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1830 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.08.06 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.08.06 from yt-dlp/yt-dlp)
[youtube:tab] Extracting URL: https://youtube.com/@ZimnyteGD/videos
[youtube:tab] @ZimnyteGD/videos: Downloading webpage
WARNING: [youtube:tab] HTTP Error 404: Not Found. Retrying (1/3)...
[youtube:tab] @ZimnyteGD/videos: Downloading webpage
WARNING: [youtube:tab] HTTP Error 404: Not Found. Retrying (2/3)...
[youtube:tab] @ZimnyteGD/videos: Downloading webpage
WARNING: [youtube:tab] HTTP Error 404: Not Found. Retrying (3/3)...
[youtube:tab] @ZimnyteGD/videos: Downloading webpage
WARNING: [youtube:tab] Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>). Giving up after 3 retries
[youtube:tab] @ZimnyteGD/videos: Downloading API parameters API JSON
ERROR: [youtube:tab] @ZimnyteGD: Failed to resolve url (does the playlist exist?)
  File "C:\Users\hgsty\AppData\Roaming\Python\Python311\site-packages\yt_dlp\extractor\common.py", line 740, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hgsty\AppData\Roaming\Python\Python311\site-packages\yt_dlp\extractor\youtube.py", line 4817, in wrapper
    info_dict = func(self, url, smuggled_data)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hgsty\AppData\Roaming\Python\Python311\site-packages\yt_dlp\extractor\youtube.py", line 6751, in _real_extract
    data, ytcfg = self._extract_data(url, display_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hgsty\AppData\Roaming\Python\Python311\site-packages\yt_dlp\extractor\youtube.py", line 5540, in _extract_data
    data = self._extract_tab_endpoint(url, item_id, ytcfg, fatal=fatal, default_client=default_client)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\hgsty\AppData\Roaming\Python\Python311\site-packages\yt_dlp\extractor\youtube.py", line 5558, in _extract_tab_endpoint
    raise ExtractorError(err_note, expected=True)
bashonly commented 2 months ago

Related: #6305

Bug on Youtube's end

HGStyle commented 2 months ago

Yeah, obviously, but if they don't fix it, is there might be a patch for it in the future ?

Le mar. 10 sept. 2024, 22:19, bashonly @.***> a écrit :

Related: #6305 https://github.com/yt-dlp/yt-dlp/issues/6305

Bug on Youtube's end

— Reply to this email directly, view it on GitHub https://github.com/yt-dlp/yt-dlp/issues/10957#issuecomment-2341938583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUBQMLBQBTTLNLMDKOTVWADZV5H6ZAVCNFSM6AAAAABN26363CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBRHEZTQNJYGM . You are receiving this because you authored the thread.Message ID: @.***>