aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/vimeo.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dlc/extractor/vimeo.py')
-rw-r--r--youtube_dlc/extractor/vimeo.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/youtube_dlc/extractor/vimeo.py b/youtube_dlc/extractor/vimeo.py
index 51a0ab2fa..299d99f6f 100644
--- a/youtube_dlc/extractor/vimeo.py
+++ b/youtube_dlc/extractor/vimeo.py
@@ -181,11 +181,12 @@ class VimeoBaseInfoExtractor(InfoExtractor):
'preference': 1,
})
- for f in formats:
- if f.get('vcodec') == 'none':
- f['preference'] = -50
- elif f.get('acodec') == 'none':
- f['preference'] = -40
+ # Reduntant code! This is already done in common.py
+ # for f in formats:
+ # if f.get('vcodec') == 'none':
+ # f['preference'] = -50
+ # elif f.get('acodec') == 'none':
+ # f['preference'] = -40
subtitles = {}
text_tracks = config['request'].get('text_tracks')
@@ -1119,6 +1120,12 @@ class VHXEmbedIE(VimeoBaseInfoExtractor):
IE_NAME = 'vhx:embed'
_VALID_URL = r'https?://embed\.vhx\.tv/videos/(?P<id>\d+)'
+ @staticmethod
+ def _extract_url(webpage):
+ mobj = re.search(
+ r'<iframe[^>]+src="(https?://embed\.vhx\.tv/videos/\d+[^"]*)"', webpage)
+ return unescapeHTML(mobj.group(1)) if mobj else None
+
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
@@ -1127,5 +1134,6 @@ class VHXEmbedIE(VimeoBaseInfoExtractor):
'ott data'), video_id, js_to_json)['config_url']
config = self._download_json(config_url, video_id)
info = self._parse_config(config, video_id)
+ info['id'] = video_id
self._vimeo_sort_formats(info['formats'])
return info