Repository: yt-dlp
Issue: Wayback Machine youtu.be links Unsupported.
Labels: site-enhancement

### 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'm running yt-dlp version **2023.07.06** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [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)
- [ ] 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

_No response_

### Provide a description that is worded well enough to be understood

Wayback Machine youtu.be links are now Unsupported.

Unless I'm misremembering it, I'm very positive that this used to work on yt-dlp a long time ago.

It's just that sometimes the actual videos are archived only on `https://web.archive.org/web/<DATE>/https://youtu.be/VIDEOID` and not on `https://web.archive.org/web/<DATE>/https://www.youtube.com/watch?v=VIDEOID` , for some reason.

Also to that end(*also please do tell me if I need to open a new feature request for this or if this comment would suffice*), could you please make it it so that regardless of which combination of youtube URL is queried on the wayback machine, as long as a VIDEOID is specified, yt-dlp checks for captures of all possible youtube URL combinations?

For example, this capture was made too late and retrieves nothing(even in a web browser) - `yt-dlp -F https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo`

But this one with the same VIDEOID works - `yt-dlp -F https://web.archive.org/web/20170612011335/https://www.youtube.com/watch?v=o_TIdWRuixo`

So if I try `yt-dlp https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo` and it fails, yt-dlp should try other combinations and be able to find and check a working capture `https://web.archive.org/web/20170612011335/https://www.youtube.com/watch?v=o_TIdWRuixo`

While I don't have examples of other working/not-working combinations of youtube URLS captures on the wayback machine at the moment, hopefully the example above adequately demonstrates the issue.

Basically yt-dlp should automatically search for all possible combinations of youtube URLS for potentially viable captures on the wayback machine. `youtu.be` , `m.youtube.com` , `https://youtube.com/watch?v=` and any others(if any).

And the same for playlist IDS as well.

Thanks.


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [x] 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
# yt-dlp -wv --no-cache-dir --geo-bypass -o "%(uploader)s-%(upload_date)s-%(title)s-%(id)s.%(ext)s" --restrict-filenames -o "%(uploader)s-%(upload_date)s-%(title)s-%(id)s" --print filename --ignore-no-formats-error https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo
[debug] Command-line config: ['-wv', '--no-cache-dir', '--geo-bypass', '-o', '%(uploader)s-%(upload_date)s-%(title)s-%(id)s.%(ext)s', '--restrict-filenames', '-o', '%(uploader)s-%(upload_date)s-%(title)s-%(id)s', '--print', 'filename', '--ignore-no-formats-error', 'https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo']
[debug] Home config "yt-dlp.conf": ['--no-cache', '--no-cache-dir', '--geo-bypass', '--no-call-home', '-R', 'infinite', '--fragment-retries', 'infinite', '--no-warnings', '--fixup', 'warn', '-o', '%(uploader)s-%(upload_date)s-%(title)s-%(id)s.%(ext)s']
[debug] yt-dlp version nightly@2023.07.13.203938 [8a4cd12c8] (zip)
[debug] Python 3.10.9 (CPython x86_64 64bit) - Linux
[debug] exe versions: ffmpeg 5.1.2-1 (setts), ffprobe 5.1.2-1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, pyxattr-0.7.2, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[generic] Extracting URL: https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo
[generic] o_TIdWRuixo: Downloading webpage
[generic] o_TIdWRuixo: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo
Traceback (most recent call last):
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1560, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1688, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/yt-dlp/yt_dlp/extractor/common.py", line 710, in extract
    ie_result = self._real_extract(url)
  File "/usr/bin/yt-dlp/yt_dlp/extractor/generic.py", line 2568, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://web.archive.org/web/20200815053649/https://youtu.be/o_TIdWRuixo
```