diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-23 01:09:17 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-23 01:29:11 +0530 |
commit | 1ee34c76bb6e3a74d5a4d76475469e64dc201063 (patch) | |
tree | 6f1d97f559ace34ed828a96cace5a234085b96e1 | |
parent | 234416e4bf39d442e7abd036b7c59b8934a4086b (diff) | |
download | hypervideo-pre-1ee34c76bb6e3a74d5a4d76475469e64dc201063.tar.lz hypervideo-pre-1ee34c76bb6e3a74d5a4d76475469e64dc201063.tar.xz hypervideo-pre-1ee34c76bb6e3a74d5a4d76475469e64dc201063.zip |
[vimeo] Add fallback for config URL
Closes #1662
-rw-r--r-- | yt_dlp/extractor/vimeo.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/yt_dlp/extractor/vimeo.py b/yt_dlp/extractor/vimeo.py index 7df4116f3..e2b86662b 100644 --- a/yt_dlp/extractor/vimeo.py +++ b/yt_dlp/extractor/vimeo.py @@ -605,6 +605,20 @@ class VimeoIE(VimeoBaseInfoExtractor): }, }, { + 'url': 'https://vimeo.com/channels/staffpicks/143603739', + 'info_dict': { + 'id': '143603739', + 'ext': 'mp4', + 'uploader': 'Karim Huu Do', + 'timestamp': 1445846953, + 'upload_date': '20151026', + 'title': 'The Shoes - Submarine Feat. Blaine Harrison', + 'uploader_id': 'karimhd', + 'description': 'md5:8e2eea76de4504c2e8020a9bcfa1e843', + }, + 'params': {'skip_download': 'm3u8'}, + }, + { # requires passing unlisted_hash(a52724358e) to load_download_config request 'url': 'https://vimeo.com/392479337/a52724358e', 'only_matching': True, @@ -798,18 +812,19 @@ class VimeoIE(VimeoBaseInfoExtractor): timestamp = None video_description = None info_dict = {} + config_url = None channel_id = self._search_regex( r'vimeo\.com/channels/([^/]+)', url, 'channel id', default=None) if channel_id: config_url = self._html_search_regex( - r'\bdata-config-url="([^"]+)"', webpage, 'config URL') + r'\bdata-config-url="([^"]+)"', webpage, 'config URL', default=None) video_description = clean_html(get_element_by_class('description', webpage)) info_dict.update({ 'channel_id': channel_id, 'channel_url': 'https://vimeo.com/channels/' + channel_id, }) - else: + if not config_url: page_config = self._parse_json(self._search_regex( r'vimeo\.(?:clip|vod_title)_page_config\s*=\s*({.+?});', webpage, 'page config', default='{}'), video_id, fatal=False) |