Repository: yt-dlp/yt-dlp

Issue:
[web.archive:youtube] Missing uploader and/or upload_date from some captures
### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I'm running yt-dlp version **2022.07.18** ([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 searched 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

United States

### Example URLs

See description

### Provide a description that is worded well enough to be understood

It is my understanding that the archive.org/Wayback machine extractor relies on captures of many different versions of YouTube webpages so the extractor has not covered all of the cases. Here are some URL I found which can be used to help improve the extractor not pulling metadata for some.

Did not extract upload_date and uploader:
https://web.archive.org/web/0/https://www.youtube.com/watch?v=8XeW5ilk-9Y
https://web.archive.org/web/0/https://www.youtube.com/watch?v=Q_yjX80U7Yc
https://web.archive.org/web/0/https://www.youtube.com/watch?v=c5uJgG05xUY
https://web.archive.org/web/0/https://www.youtube.com/watch?v=xWTLLl-dQaA

Did not extract uploader only:
https://web.archive.org/web/*/https://www.youtube.com/watch?v=9eO1aasHyTM
https://web.archive.org/web/20200416034815/https://www.youtube.com/watch?v=Cf7vS8jc7dY&gl=US&hl=en
https://web.archive.org/web/0/https://www.youtube.com/watch?v=Lg6b-yuabjI
https://web.archive.org/web/0/https://www.youtube.com/watch?v=KDxNEGq0x1U
https://web.archive.org/web/0/https://www.youtube.com/watch?v=NxAOOip1nZ4
https://web.archive.org/web/0/http://www.youtube.com/watch?v=mL-GP5qkyAM
https://web.archive.org/web/0/https://www.youtube.com/watch?v=rRCmytAVw1E
https://web.archive.org/web/0/https://www.youtube.com/watch?v=kbh4T_b4Ixw
https://web.archive.org/web/0/https://www.youtube.com/watch?v=cTf4oaro_es
https://web.archive.org/web/0/https://www.youtube.com/watch?v=D1wLshtOWsg
https://web.archive.org/web/0/https://www.youtube.com/watch?v=bGPM893vLog
https://web.archive.org/web/0/https://www.youtube.com/watch?v=_Bjua_wv4LY
https://web.archive.org/web/0/https://www.youtube.com/watch?v=kRusJD4Q1Ks
https://web.archive.org/web/0/https://www.youtube.com/watch?v=VO23JnCOW4s
https://web.archive.org/web/0/https://www.youtube.com/watch?v=d65VUt6eRgM
https://web.archive.org/web/0/https://www.youtube.com/watch?v=SOm7mPoPskU
https://web.archive.org/web/0/https://www.youtube.com/watch?v=qHL1aGEH4_4

### 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] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://web.archive.org/web/0/https://www.youtube.com/watch?v=Q_yjX80U7Yc', '--skip-download', '-j']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.07.18 [135f05e] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 2022-06-16-git-5242ede48d-full_build-www.gyan.dev (setts), ffprobe 2022-06-16-git-5242ede48d-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.07.18, Current version: 2022.07.18
yt-dlp is up to date (2022.07.18)
[debug] [web.archive:youtube] Extracting URL: https://web.archive.org/web/0/https://www.youtube.com/watch?v=Q_yjX80U7Yc
[web.archive:youtube] Q_yjX80U7Yc: Fetching archived video file url
[web.archive:youtube] Q_yjX80U7Yc: Downloading CDX API JSON
[debug] [web.archive:youtube] Captures to try: 20201121160845, 20110126141719, 20050214000000, 20500101000000
[web.archive:youtube] Q_yjX80U7Yc: Downloading capture webpage
[web.archive:youtube] Q_yjX80U7Yc: Downloading capture webpage
[web.archive:youtube] Q_yjX80U7Yc: Downloading CDX API JSON
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Q_yjX80U7Yc: Downloading 1 format(s): 34
{"id": "Q_yjX80U7Yc", "title": "Spray Paint Art by Clay Butler: Purple Fantasy Forest", "description": "Visit http://biturl.net/SprayPaintVideo to learn these techniques to create your own masterpieces in minutes!\n\nClay Butler painting a fantasy forest using only spray paint. Music from the Clay Butler Music production library. For more information on Clay's art or music, visit www.butlerproductionsmultimedia.com. Also, visit our blog at www.butlerproductionsblog.com.", "thumbnails": [{"url": "https://web.archive.org/web/20120414051423if_/http://i.ytimg.com/vi/Q_yjX80U7Yc/default.jpg?w=80&h=60&sigh=6og4ocFfS7zoz8R4qTrQbMiqvcQ", "filesize": 2057, "preference": 2057, "id": "0"}, {"url": "https://web.archive.org/web/20110126141816if_/http://i.ytimg.com/vi/Q_yjX80U7Yc/hqdefault.jpg?w=160&h=120&sigh=Jc-gD52z554qMcA9PwypmuiteaA", "filesize": 7739, "preference": 7739, "id": "1"}, {"url": "https://web.archive.org/web/20130119150131if_/http://i.ytimg.com/vi/Q_yjX80U7Yc/hqdefault.jpg?w=160&amp;h=120&amp;sigh=Jc-gD52z554qMcA9PwypmuiteaA", "filesize": 13890, "preference": 13890, "id": "2"}], "formats": [{"url": "https://web.archive.org/web/20121231194239oe_/http://r2---sn-nwj7kner.c.youtube.com/videoplayback?mv=m&gcr=us&signature=C5177EAD18A2994F169AE26D9DA48626A45AB448.24E37DBC6F20FAD43C6DC53CD6D8AA165429B182&ms=au&factor=1.25&id=43fca35fcd14ed87&fexp=927602,919358,916611,901467,920704,912806,928001,922403,922405,929901,913605,929104,913546,913556,908496,920201,913302,919009,911116,926403,901451,902556&source=youtube&sver=3&expire=1357006948&algorithm=throttle-factor&burst=40&sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&key=yt1&ip=207.241.237.152&upn=J_csn7yXBSQ&cp=U0hUTFBLVF9JUkNONF9IRVhKOmJFRUQ5enctYzZn&itag=34&ipbits=8&mt=1356982931", "filesize": 4691665, "ext": "flv", "width": 640, "height": 360, "acodec": "aac", "abr": 128, "vcodec": "h264", "format_id": "34", "format": "34 - 640x360", "protocol": "https", "resolution": "640x360", "dynamic_range": "SDR", "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}}], "webpage_url": "https://web.archive.org/web/0/https://www.youtube.com/watch?v=Q_yjX80U7Yc", "original_url": "https://web.archive.org/web/0/https://www.youtube.com/watch?v=Q_yjX80U7Yc", "webpage_url_basename": "watch", "webpage_url_domain": "web.archive.org", "extractor": "web.archive:youtube", "extractor_key": "YoutubeWebArchive", "playlist": null, "playlist_index": null, "thumbnail": "https://web.archive.org/web/20130119150131if_/http://i.ytimg.com/vi/Q_yjX80U7Yc/hqdefault.jpg?w=160&amp;h=120&amp;sigh=Jc-gD52z554qMcA9PwypmuiteaA", "display_id": "Q_yjX80U7Yc", "fulltitle": "Spray Paint Art by Clay Butler: Purple Fantasy Forest", "requested_subtitles": null, "_has_drm": null, "url": "https://web.archive.org/web/20121231194239oe_/http://r2---sn-nwj7kner.c.youtube.com/videoplayback?mv=m&gcr=us&signature=C5177EAD18A2994F169AE26D9DA48626A45AB448.24E37DBC6F20FAD43C6DC53CD6D8AA165429B182&ms=au&factor=1.25&id=43fca35fcd14ed87&fexp=927602,919358,916611,901467,920704,912806,928001,922403,922405,929901,913605,929104,913546,913556,908496,920201,913302,919009,911116,926403,901451,902556&source=youtube&sver=3&expire=1357006948&algorithm=throttle-factor&burst=40&sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&key=yt1&ip=207.241.237.152&upn=J_csn7yXBSQ&cp=U0hUTFBLVF9JUkNONF9IRVhKOmJFRUQ5enctYzZn&itag=34&ipbits=8&mt=1356982931", "filesize": 4691665, "ext": "flv", "width": 640, "height": 360, "acodec": "aac", "abr": 128, "vcodec": "h264", "format_id": "34", "format": "34 - 640x360", "protocol": "https", "resolution": "640x360", "dynamic_range": "SDR", "http_headers": {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Sec-Fetch-Mode": "navigate"}, "epoch": 1659761051, "_filename": "Spray Paint Art by Clay Butler - Purple Fantasy Forest [Q_yjX80U7Yc].flv", "filename": "Spray Paint Art by Clay Butler - Purple Fantasy Forest [Q_yjX80U7Yc].flv", "urls": "https://web.archive.org/web/20121231194239oe_/http://r2---sn-nwj7kner.c.youtube.com/videoplayback?mv=m&gcr=us&signature=C5177EAD18A2994F169AE26D9DA48626A45AB448.24E37DBC6F20FAD43C6DC53CD6D8AA165429B182&ms=au&factor=1.25&id=43fca35fcd14ed87&fexp=927602,919358,916611,901467,920704,912806,928001,922403,922405,929901,913605,929104,913546,913556,908496,920201,913302,919009,911116,926403,901451,902556&source=youtube&sver=3&expire=1357006948&algorithm=throttle-factor&burst=40&sparams=algorithm,burst,cp,factor,gcr,id,ip,ipbits,itag,source,upn,expire&key=yt1&ip=207.241.237.152&upn=J_csn7yXBSQ&cp=U0hUTFBLVF9JUkNONF9IRVhKOmJFRUQ5enctYzZn&itag=34&ipbits=8&mt=1356982931", "_type": "video"}
```



Discussion:
Yeah supporting every past version of YouTube is a difficult task, but I am open to continuously improving the extractor to cover more cases.

Resolving patch:
diff --git a/yt_dlp/extractor/archiveorg.py b/yt_dlp/extractor/archiveorg.py
--- a/yt_dlp/extractor/archiveorg.py
+++ b/yt_dlp/extractor/archiveorg.py
@@ -16,6 +16,7 @@
     get_element_by_id,
     int_or_none,
     join_nonempty,
+    js_to_json,
     merge_dicts,
     mimetype2ext,
     orderedSet,
@@ -367,7 +368,9 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'channel_id': 'UCukCyHaD-bK3in_pKpfH9Eg',
                 'duration': 32,
                 'uploader_id': 'Zeurel',
-                'uploader_url': 'http://www.youtube.com/user/Zeurel'
+                'uploader_url': 'https://www.youtube.com/user/Zeurel',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'channel_url': 'https://www.youtube.com/channel/UCukCyHaD-bK3in_pKpfH9Eg',
             }
         }, {
             # Internal link
@@ -382,7 +385,9 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'channel_id': 'UCHnyfMqiRRG1u-2MsSQLbXA',
                 'duration': 771,
                 'uploader_id': '1veritasium',
-                'uploader_url': 'http://www.youtube.com/user/1veritasium'
+                'uploader_url': 'https://www.youtube.com/user/1veritasium',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'channel_url': 'https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA',
             }
         }, {
             # Video from 2012, webm format itag 45. Newest capture is deleted video, with an invalid description.
@@ -396,7 +401,9 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'duration': 398,
                 'description': 'md5:ff4de6a7980cb65d951c2f6966a4f2f3',
                 'uploader_id': 'machinima',
-                'uploader_url': 'http://www.youtube.com/user/machinima'
+                'uploader_url': 'https://www.youtube.com/user/machinima',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'uploader': 'machinima'
             }
         }, {
             # FLV video. Video file URL does not provide itag information
@@ -410,7 +417,10 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'duration': 19,
                 'description': 'md5:10436b12e07ac43ff8df65287a56efb4',
                 'uploader_id': 'jawed',
-                'uploader_url': 'http://www.youtube.com/user/jawed'
+                'uploader_url': 'https://www.youtube.com/user/jawed',
+                'channel_url': 'https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'uploader': 'jawed',
             }
         }, {
             'url': 'https://web.archive.org/web/20110712231407/http://www.youtube.com/watch?v=lTx3G6h2xyA',
@@ -424,7 +434,9 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'duration': 204,
                 'description': 'md5:f7535343b6eda34a314eff8b85444680',
                 'uploader_id': 'itsmadeon',
-                'uploader_url': 'http://www.youtube.com/user/itsmadeon'
+                'uploader_url': 'https://www.youtube.com/user/itsmadeon',
+                'channel_url': 'https://www.youtube.com/channel/UCqMDNf3Pn5L7pcNkuSEeO3w',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
             }
         }, {
             # First capture is of dead video, second is the oldest from CDX response.
@@ -435,10 +447,13 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'title': 'Fake Teen Doctor Strikes AGAIN! - Weekly Weird News',
                 'upload_date': '20160218',
                 'channel_id': 'UCdIaNUarhzLSXGoItz7BHVA',
-                'duration': 1236,
+                'duration': 1235,
                 'description': 'md5:21032bae736421e89c2edf36d1936947',
                 'uploader_id': 'MachinimaETC',
-                'uploader_url': 'http://www.youtube.com/user/MachinimaETC'
+                'uploader_url': 'https://www.youtube.com/user/MachinimaETC',
+                'channel_url': 'https://www.youtube.com/channel/UCdIaNUarhzLSXGoItz7BHVA',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'uploader': 'ETC News',
             }
         }, {
             # First capture of dead video, capture date in link links to dead capture.
@@ -449,10 +464,13 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'title': 'WTF: Video Games Still Launch BROKEN?! - T.U.G.S.',
                 'upload_date': '20160219',
                 'channel_id': 'UCdIaNUarhzLSXGoItz7BHVA',
-                'duration': 798,
+                'duration': 797,
                 'description': 'md5:a1dbf12d9a3bd7cb4c5e33b27d77ffe7',
                 'uploader_id': 'MachinimaETC',
-                'uploader_url': 'http://www.youtube.com/user/MachinimaETC'
+                'uploader_url': 'https://www.youtube.com/user/MachinimaETC',
+                'channel_url': 'https://www.youtube.com/channel/UCdIaNUarhzLSXGoItz7BHVA',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'uploader': 'ETC News',
             },
             'expected_warnings': [
                 r'unable to download capture webpage \(it may not be archived\)'
@@ -472,12 +490,11 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'title': 'It\'s Bootleg AirPods Time.',
                 'upload_date': '20211021',
                 'channel_id': 'UC7Jwj9fkrf1adN4fMmTkpug',
-                'channel_url': 'http://www.youtube.com/channel/UC7Jwj9fkrf1adN4fMmTkpug',
+                'channel_url': 'https://www.youtube.com/channel/UC7Jwj9fkrf1adN4fMmTkpug',
                 'duration': 810,
                 'description': 'md5:7b567f898d8237b256f36c1a07d6d7bc',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
                 'uploader': 'DankPods',
-                'uploader_id': 'UC7Jwj9fkrf1adN4fMmTkpug',
-                'uploader_url': 'http://www.youtube.com/channel/UC7Jwj9fkrf1adN4fMmTkpug'
             }
         }, {
             # player response contains '};' See: https://github.com/ytdl-org/youtube-dl/issues/27093
@@ -488,12 +505,135 @@ class YoutubeWebArchiveIE(InfoExtractor):
                 'title': 'bitch lasagna',
                 'upload_date': '20181005',
                 'channel_id': 'UC-lHJZR3Gqxm24_Vd_AJ5Yw',
-                'channel_url': 'http://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw',
+                'channel_url': 'https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw',
                 'duration': 135,
                 'description': 'md5:2dbe4051feeff2dab5f41f82bb6d11d0',
                 'uploader': 'PewDiePie',
                 'uploader_id': 'PewDiePie',
-                'uploader_url': 'http://www.youtube.com/user/PewDiePie'
+                'uploader_url': 'https://www.youtube.com/user/PewDiePie',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+            }
+        }, {
+            # ~June 2010 Capture. swfconfig
+            'url': 'https://web.archive.org/web/0/https://www.youtube.com/watch?v=8XeW5ilk-9Y',
+            'info_dict': {
+                'id': '8XeW5ilk-9Y',
+                'ext': 'flv',
+                'title': 'Story of Stuff, The Critique Part 4 of 4',
+                'duration': 541,
+                'description': 'md5:28157da06f2c5e94c97f7f3072509972',
+                'uploader': 'HowTheWorldWorks',
+                'uploader_id': 'HowTheWorldWorks',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'uploader_url': 'https://www.youtube.com/user/HowTheWorldWorks',
+                'upload_date': '20090520',
+            }
+        }, {
+            # Jan 2011: watch-video-date/eow-date surrounded by whitespace
+            'url': 'https://web.archive.org/web/20110126141719/http://www.youtube.com/watch?v=Q_yjX80U7Yc',
+            'info_dict': {
+                'id': 'Q_yjX80U7Yc',
+                'ext': 'flv',
+                'title': 'Spray Paint Art by Clay Butler: Purple Fantasy Forest',
+                'uploader_id': 'claybutlermusic',
+                'description': 'md5:4595264559e3d0a0ceb3f011f6334543',
+                'upload_date': '20090803',
+                'uploader': 'claybutlermusic',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'duration': 132,
+                'uploader_url': 'https://www.youtube.com/user/claybutlermusic',
+            }
+        }, {
+            # ~May 2009 swfArgs. ytcfg is spread out over various vars
+            'url': 'https://web.archive.org/web/0/https://www.youtube.com/watch?v=c5uJgG05xUY',
+            'info_dict': {
+                'id': 'c5uJgG05xUY',
+                'ext': 'webm',
+                'title': 'Story of Stuff, The Critique Part 1 of 4',
+                'uploader_id': 'HowTheWorldWorks',
+                'uploader': 'HowTheWorldWorks',
+                'uploader_url': 'https://www.youtube.com/user/HowTheWorldWorks',
+                'upload_date': '20090513',
+                'description': 'md5:4ca77d79538064e41e4cc464e93f44f0',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'duration': 754,
+            }
+        }, {
+            # ~June 2012. Upload date is in another lang so cannot extract.
+            'url': 'https://web.archive.org/web/20120607174520/http://www.youtube.com/watch?v=xWTLLl-dQaA',
+            'info_dict': {
+                'id': 'xWTLLl-dQaA',
+                'ext': 'mp4',
+                'title': 'Black Nerd eHarmony Video Bio Parody (SPOOF)',
+                'uploader_url': 'https://www.youtube.com/user/BlackNerdComedy',
+                'description': 'md5:e25f0133aaf9e6793fb81c18021d193e',
+                'uploader_id': 'BlackNerdComedy',
+                'uploader': 'BlackNerdComedy',
+                'duration': 182,
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+            }
+        }, {
+            # ~July 2013
+            'url': 'https://web.archive.org/web/*/https://www.youtube.com/watch?v=9eO1aasHyTM',
+            'info_dict': {
+                'id': '9eO1aasHyTM',
+                'ext': 'mp4',
+                'title': 'Polar-oid',
+                'description': 'Cameras and bears are dangerous!',
+                'uploader_url': 'https://www.youtube.com/user/punkybird',
+                'uploader_id': 'punkybird',
+                'duration': 202,
+                'channel_id': 'UC62R2cBezNBOqxSerfb1nMQ',
+                'channel_url': 'https://www.youtube.com/channel/UC62R2cBezNBOqxSerfb1nMQ',
+                'upload_date': '20060428',
+                'uploader': 'punkybird',
+            }
+        }, {
+            # April 2020: Player response in player config
+            'url': 'https://web.archive.org/web/20200416034815/https://www.youtube.com/watch?v=Cf7vS8jc7dY&gl=US&hl=en',
+            'info_dict': {
+                'id': 'Cf7vS8jc7dY',
+                'ext': 'mp4',
+                'title': 'A Dramatic Pool Story (by Jamie Spicer-Lewis) - Game Grumps Animated',
+                'duration': 64,
+                'upload_date': '20200408',
+                'uploader_id': 'GameGrumps',
+                'uploader': 'GameGrumps',
+                'channel_url': 'https://www.youtube.com/channel/UC9CuvdOVfMPvKCiwdGKL3cQ',
+                'channel_id': 'UC9CuvdOVfMPvKCiwdGKL3cQ',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'description': 'md5:c625bb3c02c4f5fb4205971e468fa341',
+                'uploader_url': 'https://www.youtube.com/user/GameGrumps',
+            }
+        }, {
+            # watch7-user-header with yt-user-info
+            'url': 'ytarchive:kbh4T_b4Ixw:20160307085057',
+            'info_dict': {
+                'id': 'kbh4T_b4Ixw',
+                'ext': 'mp4',
+                'title': 'Shovel Knight OST - Strike the Earth! Plains of Passage 16 bit SNES style remake / remix',
+                'channel_url': 'https://www.youtube.com/channel/UCnTaGvsHmMy792DWeT6HbGA',
+                'uploader': 'Nelward music',
+                'duration': 213,
+                'description': 'md5:804b4a9ce37b050a5fefdbb23aeba54d',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'upload_date': '20150503',
+                'channel_id': 'UCnTaGvsHmMy792DWeT6HbGA',
+            }
+        }, {
+            # April 2012
+            'url': 'https://web.archive.org/web/0/https://www.youtube.com/watch?v=SOm7mPoPskU',
+            'info_dict': {
+                'id': 'SOm7mPoPskU',
+                'ext': 'mp4',
+                'title': 'Boyfriend - Justin Bieber Parody',
+                'uploader_url': 'https://www.youtube.com/user/thecomputernerd01',
+                'uploader': 'thecomputernerd01',
+                'thumbnail': r're:https?://.*\.(jpg|webp)',
+                'description': 'md5:dd7fa635519c2a5b4d566beaecad7491',
+                'duration': 200,
+                'upload_date': '20120407',
+                'uploader_id': 'thecomputernerd01',
             }
         }, {
             'url': 'https://web.archive.org/web/http://www.youtube.com/watch?v=kH-G_aIBlFw',
@@ -574,6 +714,27 @@ def _extract_metadata(self, video_id, webpage):
         initial_data = self._search_json(
             self._YT_INITIAL_DATA_RE, webpage, 'initial data', video_id, default={})
 
+        ytcfg = {}
+        for j in re.findall(r'yt\.setConfig\(\s*(?P<json>{\s*(?s:.+?)\s*})\s*\);', webpage):  # ~June 2010
+            ytcfg.update(self._parse_json(j, video_id, fatal=False, ignore_extra=True, transform_source=js_to_json, errnote='') or {})
+
+        # XXX: this also may contain a 'ptchn' key
+        player_config = (
+            self._search_json(
+                r'(?:yt\.playerConfig|ytplayer\.config|swfConfig)\s*=',
+                webpage, 'player config', video_id, default=None)
+            or ytcfg.get('PLAYER_CONFIG') or {})
+
+        # XXX: this may also contain a 'creator' key.
+        swf_args = self._search_json(r'swfArgs\s*=', webpage, 'swf config', video_id, default={})
+        if swf_args and not traverse_obj(player_config, ('args',)):
+            player_config['args'] = swf_args
+
+        if not player_response:
+            # April 2020
+            player_response = self._parse_json(
+                traverse_obj(player_config, ('args', 'player_response')) or '{}', video_id, fatal=False)
+
         initial_data_video = traverse_obj(
             initial_data, ('contents', 'twoColumnWatchNextResults', 'results', 'results', 'contents', ..., 'videoPrimaryInfoRenderer'),
             expected_type=dict, get_all=False, default={})
@@ -588,21 +749,64 @@ def _extract_metadata(self, video_id, webpage):
             video_details.get('title')
             or YoutubeBaseInfoExtractor._get_text(microformats, 'title')
             or YoutubeBaseInfoExtractor._get_text(initial_data_video, 'title')
+            or traverse_obj(player_config, ('args', 'title'))
             or self._extract_webpage_title(webpage)
             or search_meta(['og:title', 'twitter:title', 'title']))
 
+        def id_from_url(url, type_):
+            return self._search_regex(
+                rf'(?:{type_})/([^/#&?]+)', url or '', f'{type_} id', default=None)
+
+        # XXX: would the get_elements_by_... functions be better suited here?
+        _CHANNEL_URL_HREF_RE = r'href="[^"]*(?P<url>https?://www\.youtube\.com/(?:user|channel)/[^"]+)"'
+        uploader_or_channel_url = self._search_regex(
+            [fr'<(?:link\s*itemprop=\"url\"|a\s*id=\"watch-username\").*?\b{_CHANNEL_URL_HREF_RE}>',  # @fd05024
+             fr'<div\s*id=\"(?:watch-channel-stats|watch-headline-user-info)\"[^>]*>\s*<a[^>]*\b{_CHANNEL_URL_HREF_RE}'],  # ~ May 2009, ~June 2012
+            webpage, 'uploader or channel url', default=None)
+
+        owner_profile_url = url_or_none(microformats.get('ownerProfileUrl'))  # @a6211d2
+
+        # Uploader refers to the /user/ id ONLY
+        uploader_id = (
+            id_from_url(owner_profile_url, 'user')
+            or id_from_url(uploader_or_channel_url, 'user')
+            or ytcfg.get('VIDEO_USERNAME'))
+        uploader_url = f'https://www.youtube.com/user/{uploader_id}' if uploader_id else None
+
+        # XXX: do we want to differentiate uploader and channel?
+        uploader = (
+            self._search_regex(
+                [r'<a\s*id="watch-username"[^>]*>\s*<strong>([^<]+)</strong>',  # June 2010
+                 r'var\s*watchUsername\s*=\s*\'(.+?)\';',  # ~May 2009
+                 r'<div\s*\bid=\"watch-channel-stats"[^>]*>\s*<a[^>]*>\s*(.+?)\s*</a',  # ~May 2009
+                 r'<a\s*id="watch-userbanner"[^>]*title="\s*(.+?)\s*"'],  # ~June 2012
+                webpage, 'uploader', default=None)
+            or self._html_search_regex(
+                [r'(?s)<div\s*class="yt-user-info".*?<a[^>]*[^>]*>\s*(.*?)\s*</a',  # March 2016
+                 r'(?s)<a[^>]*yt-user-name[^>]*>\s*(.*?)\s*</a'],  # july 2013
+                get_element_by_id('watch7-user-header', webpage), 'uploader', default=None)
+            or self._html_search_regex(
+                r'<button\s*href="/user/[^>]*>\s*<span[^>]*>\s*(.+?)\s*<',  # April 2012
+                get_element_by_id('watch-headline-user-info', webpage), 'uploader', default=None)
+            or traverse_obj(player_config, ('args', 'creator'))
+            or video_details.get('author'))
+
         channel_id = str_or_none(
             video_details.get('channelId')
             or microformats.get('externalChannelId')
             or search_meta('channelId')
             or self._search_regex(
                 r'data-channel-external-id=(["\'])(?P<id>(?:(?!\1).)+)\1',  # @b45a9e6
-                webpage, 'channel id', default=None, group='id'))
-        channel_url = f'http://www.youtube.com/channel/{channel_id}' if channel_id else None
+                webpage, 'channel id', default=None, group='id')
+            or id_from_url(owner_profile_url, 'channel')
+            or id_from_url(uploader_or_channel_url, 'channel')
+            or traverse_obj(player_config, ('args', 'ucid')))
 
+        channel_url = f'https://www.youtube.com/channel/{channel_id}' if channel_id else None
         duration = int_or_none(
             video_details.get('lengthSeconds')
             or microformats.get('lengthSeconds')
+            or traverse_obj(player_config, ('args', ('length_seconds', 'l')), get_all=False)
             or parse_duration(search_meta('duration')))
         description = (
             video_details.get('shortDescription')
@@ -610,26 +814,13 @@ def _extract_metadata(self, video_id, webpage):
             or clean_html(get_element_by_id('eow-description', webpage))  # @9e6dd23
             or search_meta(['description', 'og:description', 'twitter:description']))
 
-        uploader = video_details.get('author')
-
-        # Uploader ID and URL
-        uploader_mobj = re.search(
-            r'<link itemprop="url" href="(?P<uploader_url>https?://www\.youtube\.com/(?:user|channel)/(?P<uploader_id>[^"]+))">',  # @fd05024
-            webpage)
-        if uploader_mobj is not None:
-            uploader_id, uploader_url = uploader_mobj.group('uploader_id'), uploader_mobj.group('uploader_url')
-        else:
-            # @a6211d2
-            uploader_url = url_or_none(microformats.get('ownerProfileUrl'))
-            uploader_id = self._search_regex(
-                r'(?:user|channel)/([^/]+)', uploader_url or '', 'uploader id', default=None)
-
         upload_date = unified_strdate(
             dict_get(microformats, ('uploadDate', 'publishDate'))
             or search_meta(['uploadDate', 'datePublished'])
             or self._search_regex(
-                [r'(?s)id="eow-date.*?>(.*?)</span>',
-                 r'(?:id="watch-uploader-info".*?>.*?|["\']simpleText["\']\s*:\s*["\'])(?:Published|Uploaded|Streamed live|Started) on (.+?)[<"\']'],  # @7998520
+                [r'(?s)id="eow-date.*?>\s*(.*?)\s*</span>',
+                 r'(?:id="watch-uploader-info".*?>.*?|["\']simpleText["\']\s*:\s*["\'])(?:Published|Uploaded|Streamed live|Started) on (.+?)[<"\']',  # @7998520
+                 r'class\s*=\s*"(?:watch-video-date|watch-video-added post-date)"[^>]*>\s*([^<]+?)\s*<'],  # ~June 2010, ~Jan 2009 (respectively)
                 webpage, 'upload date', default=None))
 
         return {
@@ -698,18 +889,22 @@ def _real_extract(self, url):
         url_date = url_date or url_date_2
 
         urlh = None
-        try:
-            urlh = self._request_webpage(
-                HEADRequest('https://web.archive.org/web/2oe_/http://wayback-fakeurl.archive.org/yt/%s' % video_id),
-                video_id, note='Fetching archived video file url', expected_status=True)
-        except ExtractorError as e:
-            # HTTP Error 404 is expected if the video is not saved.
-            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 404:
-                self.raise_no_formats(
-                    'The requested video is not archived, indexed, or there is an issue with web.archive.org',
-                    expected=True)
-            else:
-                raise
+        retry_manager = self.RetryManager(fatal=False)
+        for retry in retry_manager:
+            try:
+                urlh = self._request_webpage(
+                    HEADRequest('https://web.archive.org/web/2oe_/http://wayback-fakeurl.archive.org/yt/%s' % video_id),
+                    video_id, note='Fetching archived video file url', expected_status=True)
+            except ExtractorError as e:
+                # HTTP Error 404 is expected if the video is not saved.
+                if isinstance(e.cause, compat_HTTPError) and e.cause.code == 404:
+                    self.raise_no_formats(
+                        'The requested video is not archived, indexed, or there is an issue with web.archive.org (try again later)', expected=True)
+                else:
+                    retry.error = e
+
+        if retry_manager.error:
+            self.raise_no_formats(retry_manager.error, expected=True, video_id=video_id)
 
         capture_dates = self._get_capture_dates(video_id, int_or_none(url_date))
         self.write_debug('Captures to try: ' + join_nonempty(*capture_dates, delim=', '))


Test patch: