aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2020-12-27 08:55:51 +0100
committerRemita Amine <remitamine@gmail.com>2020-12-27 09:00:07 +0100
commit0fa67c1d686c1c25b467906307cafefa885c4a80 (patch)
tree816acfbf092cb7f7797c6aad497f124896ec973b /youtube_dl/extractor/generic.py
parent365b3cc72dc265d20ece3e57f6abe590eb026544 (diff)
downloadyoutube-dl-0fa67c1d686c1c25b467906307cafefa885c4a80.tar.xz
[generic] Add support for VHX Embeds(#27546)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 6e46b2c0e..14c27c6da 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -67,7 +67,10 @@ from .tube8 import Tube8IE
from .mofosex import MofosexEmbedIE
from .spankwire import SpankwireIE
from .youporn import YouPornIE
-from .vimeo import VimeoIE
+from .vimeo import (
+ VimeoIE,
+ VHXEmbedIE,
+)
from .dailymotion import DailymotionIE
from .dailymail import DailyMailIE
from .onionstudios import OnionStudiosIE
@@ -2193,7 +2196,18 @@ class GenericIE(InfoExtractor):
# 'params': {
# 'force_generic_extractor': True,
# },
- # }
+ # },
+ {
+ # VHX Embed
+ 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
+ 'info_dict': {
+ 'id': '858208',
+ 'ext': 'mp4',
+ 'title': 'Untitled',
+ 'uploader_id': 'user80538407',
+ 'uploader': 'OTT Videos',
+ },
+ },
]
def report_following_redirect(self, new_url):
@@ -2571,6 +2585,10 @@ class GenericIE(InfoExtractor):
if vimeo_urls:
return self.playlist_from_matches(vimeo_urls, video_id, video_title, ie=VimeoIE.ie_key())
+ vhx_url = VHXEmbedIE._extract_url(webpage)
+ if vhx_url:
+ return self.url_result(vhx_url, VHXEmbedIE.ie_key())
+
vid_me_embed_url = self._search_regex(
r'src=[\'"](https?://vid\.me/[^\'"]+)[\'"]',
webpage, 'vid.me embed', default=None)