Repository: yt-dlp/yt-dlp

Issue:
Vimeo Pro - 1920 Pixel Video not downloadable
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.11.11** ([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 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

Germany

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

Hello,

Site: https://vimeopro.com/cadfem/simulation-conference-mechanische-systeme-in-perfektion
Password: Conference2022

"Original Media Link":
https://11vod-adaptive.akamaized.net/exp=1668900760~acl=%2F92554567-2f1f-4673-8169-5f7c39af9df2%2F%2A~hmac=a78f89f321cb5ab802b5e262bf1a7b8f996988ff8df88aa8b9cc03aa6c6d6b53/92554567-2f1f-4673-8169-5f7c39af9df2/sep/video/e22e0b59,d3d2c0c8,7acab0de,ba502be5,0f745f59/audio/7cc595f1,8de9c6ad,a22024ff/master.json?query_string_ranges=1&base64_init=1

I was able to "decipher" what is what. So the "base" would be:
https://11vod-adaptive.akamaized.net/exp=1668900760~acl=%2F92554567-2f1f-4673-8169-5f7c39af9df2%2F%2A~hmac=a78f89f321cb5ab802b5e262bf1a7b8f996988ff8df88aa8b9cc03aa6c6d6b53/92554567-2f1f-4673-8169-5f7c39af9df2/parcel/

and following extensions apply:

AUDIO
audio/a22024ff.mp4 63,6 kb/s
audio/8de9c6ad.mp4 95,1 kb/s
audio/7cc595f1.mp4 192 kb/s

VIDEO
video/e22e0b59.mp4 960 Pixel
video/d3d2c0c8.mp4 426 Pixel
video/7acab0de.mp4 640 Pixel
video/ba502be5.mp4 NOT WORKING
video/0f745f59.mp4 1280 Pixel

My problem is "video/ba502be5.mp4", which would certainly be the 1920 Pixel Video.
How can I get it?
I can download all other files just fine!

Thank you & best wishes! : )

### 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
>yt-dlp.exe -vU  --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" --video-password Conference2022 --referer "https://vimeopro.com/cadfem/simulation-conference-mechanische-systeme-in-perfektion" --add-header "Origin: https://player.vimeo.com" --cookies-from-browser chrome "https://11vod-adaptive.akamaized.net/exp=1668900760~acl=%2F92554567-2f1f-4673-8169-5f7c39af9df2%2F%2A~hmac=a78f89f321cb5ab802b5e262bf1a7b8f996988ff8df88aa8b9cc03aa6c6d6b53/92554567-2f1f-4673-8169-5f7c39af9df2/parcel/video/ba502be5.mp4"
[debug] Command-line config: ['-vU', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', '--video-password', 'PRIVATE', '--referer', 'https://vimeopro.com/cadfem/simulation-conference-mechanische-systeme-in-perfektion', '--add-header', 'Origin: https://player.vimeo.com', '--cookies-from-browser', 'chrome', 'https://11vod-adaptive.akamaized.net/exp=1668900760~acl=%2F92554567-2f1f-4673-8169-5f7c39af9df2%2F%2A~hmac=a78f89f321cb5ab802b5e262bf1a7b8f996988ff8df88aa8b9cc03aa6c6d6b53/92554567-2f1f-4673-8169-5f7c39af9df2/parcel/video/ba502be5.mp4']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2022-11-03-git-5ccd4d3060-full_build-www.gyan.dev (setts), ffprobe 2022-11-03-git-5ccd4d3060-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\XXX\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\XXX\AppData\Local\Google\Chrome\User Data\Local State"
[Cookies] Extracted 725 cookies from chrome
[debug] cookie version breakdown: {'v10': 725, 'other': 0, 'unencrypted': 0}
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [generic] Extracting URL: https://11vod-adaptive.akamaized.net/exp=1668900760~acl=%2F92554567-2f1f-4673-8169-5f7c39af9df2%2F%2A~hmac=a78f89f321cb5ab802b5e262bf1a7b8f996988ff8df88aa8b9cc03aa6c6d6b53/92554567-2f1f-4673-8169-5f7c39af9df2/parcel/video/ba502be5.mp4
[generic] ba502be5: Downloading webpage
ERROR: [generic] Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 674, in extract
  File "yt_dlp\extractor\generic.py", line 2582, in _real_extract
  File "yt_dlp\extractor\common.py", line 825, in _request_webpage

  File "yt_dlp\extractor\common.py", line 807, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3692, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden
```



Discussion:
You want to view the source of the webpage that the player is embedded in, get the full player URL with all query params, pass that as the URL and pass the original webpage URL as the referer:
```
yt-dlp "https://player.vimeo.com/video/764543723?h=f4a7f509ff&portfolio_id=1612641" --referer "https://vimeopro.com/cadfem/simulation-conference-mechanische-systeme-in-perfektion"
```
Thanks a lot!
@bashonly 
Out of interest: Why does my way not work? Why do all other mentioned media files work, but not that specific one?
> @bashonly Out of interest: Why does my way not work? Why do all other mentioned media files work, but not that specific one?

not sure exactly why that particular mp4 link doesn't work. yt-dlp is able to get the 1920x1080 formats via the DASH manifests instead.

I am keeping this issue open as a site-bug, since I believe this type of vimeopro.com URL should be supported without having to use the workaround I posted earlier

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
@@ -2096,6 +2096,7 @@
     VimeoGroupsIE,
     VimeoLikesIE,
     VimeoOndemandIE,
+    VimeoProIE,
     VimeoReviewIE,
     VimeoUserIE,
     VimeoWatchLaterIE,
diff --git a/yt_dlp/extractor/vimeo.py b/yt_dlp/extractor/vimeo.py
--- a/yt_dlp/extractor/vimeo.py
+++ b/yt_dlp/extractor/vimeo.py
@@ -2,6 +2,7 @@
 import functools
 import re
 import itertools
+import urllib.error
 
 from .common import InfoExtractor
 from ..compat import (
@@ -311,7 +312,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
                             )
                             \.
                         )?
-                        vimeo(?:pro)?\.com/
+                        vimeo\.com/
                         (?!(?:channels|album|showcase)/[^/?#]+/?(?:$|[?#])|[^/]+/review/|ondemand/)
                         (?:[^/]+/)*?
                         (?:
@@ -355,31 +356,6 @@ class VimeoIE(VimeoBaseInfoExtractor):
             },
             'skip': 'No longer available'
         },
-        {
-            'url': 'http://vimeopro.com/openstreetmapus/state-of-the-map-us-2013/video/68093876',
-            'md5': '3b5ca6aa22b60dfeeadf50b72e44ed82',
-            'note': 'Vimeo Pro video (#1197)',
-            'info_dict': {
-                'id': '68093876',
-                'ext': 'mp4',
-                'uploader_url': r're:https?://(?:www\.)?vimeo\.com/openstreetmapus',
-                'uploader_id': 'openstreetmapus',
-                'uploader': 'OpenStreetMap US',
-                'title': 'Andy Allan - Putting the Carto into OpenStreetMap Cartography',
-                'description': 'md5:2c362968038d4499f4d79f88458590c1',
-                'duration': 1595,
-                'upload_date': '20130610',
-                'timestamp': 1370893156,
-                'license': 'by',
-                'thumbnail': 'https://i.vimeocdn.com/video/440260469-19b0d92fca3bd84066623b53f1eb8aaa3980c6c809e2d67b6b39ab7b4a77a344-d_960',
-                'view_count': int,
-                'comment_count': int,
-                'like_count': int,
-            },
-            'params': {
-                'format': 'best[protocol=https]',
-            },
-        },
         {
             'url': 'http://player.vimeo.com/video/54469442',
             'md5': 'b3e7f4d2cbb53bd7dc3bb6ff4ed5cfbd',
@@ -837,15 +813,7 @@ def _real_extract(self, url):
         if unlisted_hash:
             return self._extract_from_api(video_id, unlisted_hash)
 
-        orig_url = url
-        is_pro = 'vimeopro.com/' in url
-        if is_pro:
-            # some videos require portfolio_id to be present in player url
-            # https://github.com/ytdl-org/youtube-dl/issues/20070
-            url = self._extract_url(url, self._download_webpage(url, video_id))
-            if not url:
-                url = 'https://vimeo.com/' + video_id
-        elif any(p in url for p in ('play_redirect_hls', 'moogaloop.swf')):
+        if any(p in url for p in ('play_redirect_hls', 'moogaloop.swf')):
             url = 'https://vimeo.com/' + video_id
 
         self._try_album_password(url)
@@ -947,14 +915,6 @@ def is_rented():
             video_description = self._html_search_meta(
                 ['description', 'og:description', 'twitter:description'],
                 webpage, default=None)
-        if not video_description and is_pro:
-            orig_webpage = self._download_webpage(
-                orig_url, video_id,
-                note='Downloading webpage for description',
-                fatal=False)
-            if orig_webpage:
-                video_description = self._html_search_meta(
-                    'description', orig_webpage, default=None)
         if not video_description:
             self.report_warning('Cannot find video description')
 
@@ -1393,3 +1353,89 @@ def _real_extract(self, url):
         info = self._parse_config(config, video_id)
         info['id'] = video_id
         return info
+
+
+class VimeoProIE(VimeoBaseInfoExtractor):
+    IE_NAME = 'vimeo:pro'
+    _VALID_URL = r'https?://(?:www\.)?vimeopro\.com/[^/?#]+/(?P<slug>[^/?#]+)(?:(?:/videos?/(?P<id>[0-9]+)))?'
+    _TESTS = [{
+        # Vimeo URL derived from video_id
+        'url': 'http://vimeopro.com/openstreetmapus/state-of-the-map-us-2013/video/68093876',
+        'md5': '3b5ca6aa22b60dfeeadf50b72e44ed82',
+        'note': 'Vimeo Pro video (#1197)',
+        'info_dict': {
+            'id': '68093876',
+            'ext': 'mp4',
+            'uploader_url': r're:https?://(?:www\.)?vimeo\.com/openstreetmapus',
+            'uploader_id': 'openstreetmapus',
+            'uploader': 'OpenStreetMap US',
+            'title': 'Andy Allan - Putting the Carto into OpenStreetMap Cartography',
+            'description': 'md5:2c362968038d4499f4d79f88458590c1',
+            'duration': 1595,
+            'upload_date': '20130610',
+            'timestamp': 1370893156,
+            'license': 'by',
+            'thumbnail': 'https://i.vimeocdn.com/video/440260469-19b0d92fca3bd84066623b53f1eb8aaa3980c6c809e2d67b6b39ab7b4a77a344-d_960',
+            'view_count': int,
+            'comment_count': int,
+            'like_count': int,
+            'tags': 'count:1',
+        },
+        'params': {
+            'format': 'best[protocol=https]',
+        },
+    }, {
+        # password-protected VimeoPro page with Vimeo player embed
+        'url': 'https://vimeopro.com/cadfem/simulation-conference-mechanische-systeme-in-perfektion',
+        'info_dict': {
+            'id': '764543723',
+            'ext': 'mp4',
+            'title': 'Mechanische Systeme in Perfektion: Realität erfassen, Innovation treiben',
+            'thumbnail': 'https://i.vimeocdn.com/video/1543784598-a1a750494a485e601110136b9fe11e28c2131942452b3a5d30391cb3800ca8fd-d_1280',
+            'description': 'md5:2a9d195cd1b0f6f79827107dc88c2420',
+            'uploader': 'CADFEM',
+            'uploader_id': 'cadfem',
+            'uploader_url': 'https://vimeo.com/cadfem',
+            'duration': 12505,
+            'chapters': 'count:10',
+        },
+        'params': {
+            'videopassword': 'Conference2022',
+            'skip_download': True,
+        },
+    }]
+
+    def _real_extract(self, url):
+        display_id, video_id = self._match_valid_url(url).group('slug', 'id')
+        if video_id:
+            display_id = video_id
+        webpage = self._download_webpage(url, display_id)
+
+        password_form = self._search_regex(
+            r'(?is)<form[^>]+?method=["\']post["\'][^>]*>(.+?password.+?)</form>',
+            webpage, 'password form', default=None)
+        if password_form:
+            try:
+                webpage = self._download_webpage(url, display_id, data=urlencode_postdata({
+                    'password': self._get_video_password(),
+                    **self._hidden_inputs(password_form),
+                }), note='Logging in with video password')
+            except ExtractorError as e:
+                if isinstance(e.cause, urllib.error.HTTPError) and e.cause.code == 418:
+                    raise ExtractorError('Wrong video password', expected=True)
+                raise
+
+        description = None
+        # even if we have video_id, some videos require player URL with portfolio_id query param
+        # https://github.com/ytdl-org/youtube-dl/issues/20070
+        vimeo_url = VimeoIE._extract_url(url, webpage)
+        if vimeo_url:
+            description = self._html_search_meta('description', webpage, default=None)
+        elif video_id:
+            vimeo_url = f'https://vimeo.com/{video_id}'
+        else:
+            raise ExtractorError(
+                'No Vimeo embed or video ID could be found in VimeoPro page', expected=True)
+
+        return self.url_result(vimeo_url, VimeoIE, video_id, url_transparent=True,
+                               description=description)


Test patch: