Repository: yt-dlp/yt-dlp

Issue:
Video on Aeon.Co - Cannot Download Its Vimeo Embed
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2021.11.10.1**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#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 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

United States of America

### Description

Aeon uses Vimeo and YouTube embeds.  However, it cannot recognize the Vimeo embed in the page; the page itself does not have a Vimeo link accessible from the player; and digging into the code for the Vimeo player.vimeo.com link fails, as it errors out with:

[vimeo] 639714423: Cannot download embed-only video without embedding URL. Please call yt-dlp with the URL of the page that embeds this video.

### Verbose log

```shell
[debug] Command-line config: ['-Uv', 'https://aeon.co/videos/a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown']
[debug] Portable config file: C:\Users\[NAME OMITTED]\bin\EXE\yt-dlp.conf
[debug] Portable config: ['-f', 'mp4', '-o', 'C:\\Users\\[SHORT NAME OMITTED]\\Desktop\\%(duration>%H-%M-%S)s %(title)s.%(ext)s', '--sponsorblock-remove', 'all']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.11.10.1 (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19043-SP0
[debug] exe versions: ffmpeg n4.4.1-2-gcc33e73618-20211107 (setts), ffprobe n4.4.1-2-gcc33e73618-20211107
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
yt-dlp is up to date (2021.11.10.1)
[debug] [generic] Extracting URL: https://aeon.co/videos/a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown
[generic] a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown: Downloading webpage
[generic] a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown: Extracting information
[debug] Looking for video embeds
[debug] Identified a JSON LD
[SponsorBlock] SponsorBlock is not supported for Generic
ERROR: [generic] a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown: Requested format is not available
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1311, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1349, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1399, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2414, in process_video_result
yt_dlp.utils.ExtractorError: [generic] a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown: Requested format is not available
```



Discussion:
There is no actual embed in the page. Support for this site will need to be specifically added

> digging into the code for the Vimeo player.vimeo.com link fails, as it errors out with:

> [vimeo] 639714423: Cannot download embed-only video without embedding URL. Please call yt-dlp with the URL of the page that embeds this video.

For this, you can pass `--referer`
```
➤ yt-dlp "https://player.vimeo.com/video/639714423" --referer "https://aeon.co/videos/a-unique-theatre-performance-explores-what-touch-means-in-an-age-of-lockdown"
[vimeo] 639714423: Downloading webpage
[vimeo] 639714423: Downloading akfire_interconnect_quic m3u8 information
WARNING: [vimeo] Ignoring subtitle tracks found in the HLS manifest; if any subtitle tracks are missing, please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
[vimeo] 639714423: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 639714423: Downloading fastly_skyfire m3u8 information
[vimeo] 639714423: Downloading fastly_skyfire m3u8 information
[vimeo] 639714423: Downloading akfire_interconnect_quic MPD information
[vimeo] 639714423: Downloading akfire_interconnect_quic MPD information
[vimeo] 639714423: Downloading fastly_skyfire MPD information
[vimeo] 639714423: Downloading fastly_skyfire MPD information
[info] 639714423: Downloading 1 format(s): dash-fastly_skyfire-video-ba4204b6
[dashsegments] Total fragments: 189
[download] Destination: Skin Hunger [639714423].mp4

ERROR: Interrupted by user
```
In a weird moment of serendipity, I worked on this a little bit last night, and managed to download it via referrer -- although what I found was that the downloaded video did not seem to play correctly.  It seemed to have frozen images, then catch up.  I don't know for sure that's the fault of anything -- I don't believe it was related to my machine or hardware -- but just passing that along in the 'for what it's worth' department.
did your download have skipped fragments?
I do not remember seeing any in the report, no.  I will try again this
evening and pay closer attention to that request.

On Mon, Nov 22, 2021 at 12:39 PM pukkandan ***@***.***> wrote:

> did your download have skipped fragments?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/yt-dlp/yt-dlp/issues/1653#issuecomment-975812435>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AN7TXAZZU5BDX3SD25UVIALUNKE5BANCNFSM5H62SG6Q>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>

It is unlikely to be yt-dlp's issue. But if you encounter it again (do test in multiple players just in case) with no skipped fragments and can check that this does not happen in browser, feel free to open a new bug report for it (with verbose log)

Resolving patch:
diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py
--- a/yt_dlp/extractor/_extractors.py
+++ b/yt_dlp/extractor/_extractors.py
@@ -65,6 +65,7 @@
     HistoryPlayerIE,
     BiographyIE,
 )
+from .aeonco import AeonCoIE
 from .afreecatv import (
     AfreecaTVIE,
     AfreecaTVLiveIE,
diff --git a/yt_dlp/extractor/aeonco.py b/yt_dlp/extractor/aeonco.py
new file mode 100644
--- /dev/null
+++ b/yt_dlp/extractor/aeonco.py
@@ -0,0 +1,40 @@
+from .common import InfoExtractor
+from .vimeo import VimeoIE
+
+
+class AeonCoIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?aeon\.co/videos/(?P<id>[^/?]+)'
+    _TESTS = [{
+        'url': 'https://aeon.co/videos/raw-solar-storm-footage-is-the-punk-rock-antidote-to-sleek-james-webb-imagery',
+        'md5': 'e5884d80552c9b6ea8d268a258753362',
+        'info_dict': {
+            'id': '1284717',
+            'ext': 'mp4',
+            'title': 'Brilliant Noise',
+            'thumbnail': 'https://i.vimeocdn.com/video/21006315-1a1e49da8b07fd908384a982b4ba9ff0268c509a474576ebdf7b1392f4acae3b-d_960',
+            'uploader': 'Semiconductor',
+            'uploader_id': 'semiconductor',
+            'uploader_url': 'https://vimeo.com/semiconductor',
+            'duration': 348
+        }
+    }, {
+        'url': 'https://aeon.co/videos/dazzling-timelapse-shows-how-microbes-spoil-our-food-and-sometimes-enrich-it',
+        'md5': '4e5f3dad9dbda0dbfa2da41a851e631e',
+        'info_dict': {
+            'id': '728595228',
+            'ext': 'mp4',
+            'title': 'Wrought',
+            'thumbnail': 'https://i.vimeocdn.com/video/1484618528-c91452611f9a4e4497735a533da60d45b2fe472deb0c880f0afaab0cd2efb22a-d_1280',
+            'uploader': 'Biofilm Productions',
+            'uploader_id': 'user140352216',
+            'uploader_url': 'https://vimeo.com/user140352216',
+            'duration': 1344
+        }
+    }]
+
+    def _real_extract(self, url):
+        video_id = self._match_id(url)
+        webpage = self._download_webpage(url, video_id)
+        vimeo_id = self._search_regex(r'hosterId":\s*"(?P<id>[0-9]+)', webpage, 'vimeo id')
+        vimeo_url = VimeoIE._smuggle_referrer(f'https://player.vimeo.com/video/{vimeo_id}', 'https://aeon.co')
+        return self.url_result(vimeo_url, VimeoIE)


Test patch: