Repository: yt-dlp
Issue: [youtube:tab] HTTP Error 404: Not Found for some YouTube channels due to YouTube weirdness
Labels: external issue,site-bug,site:youtube

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### 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

- [X] 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
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
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)
```