mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-21 05:44:02 -07:00
[generic] Add support for VHX Embeds(#27546)
This commit is contained in:
parent
365b3cc72d
commit
0fa67c1d68
2 changed files with 27 additions and 2 deletions
|
@ -1119,6 +1119,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 +1133,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue