[extractor/generic] Add support for webcaster.pro embeds
This commit is contained in:
parent
f25e1c8d8c
commit
83f1481baa
|
@ -60,6 +60,7 @@ from .screenwavemedia import ScreenwaveMediaIE
|
||||||
from .mtv import MTVServicesEmbeddedIE
|
from .mtv import MTVServicesEmbeddedIE
|
||||||
from .pladform import PladformIE
|
from .pladform import PladformIE
|
||||||
from .videomore import VideomoreIE
|
from .videomore import VideomoreIE
|
||||||
|
from .webcaster import WebcasterFeedIE
|
||||||
from .googledrive import GoogleDriveIE
|
from .googledrive import GoogleDriveIE
|
||||||
from .jwplatform import JWPlatformIE
|
from .jwplatform import JWPlatformIE
|
||||||
from .digiteka import DigitekaIE
|
from .digiteka import DigitekaIE
|
||||||
|
@ -2140,6 +2141,11 @@ class GenericIE(InfoExtractor):
|
||||||
if videomore_url:
|
if videomore_url:
|
||||||
return self.url_result(videomore_url)
|
return self.url_result(videomore_url)
|
||||||
|
|
||||||
|
# Look for Webcaster embeds
|
||||||
|
webcaster_url = WebcasterFeedIE._extract_url(self, webpage)
|
||||||
|
if webcaster_url:
|
||||||
|
return self.url_result(webcaster_url, ie=WebcasterFeedIE.ie_key())
|
||||||
|
|
||||||
# Look for Playwire embeds
|
# Look for Playwire embeds
|
||||||
mobj = re.search(
|
mobj = re.search(
|
||||||
r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
|
r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
|
||||||
|
|
|
@ -74,6 +74,23 @@ class WebcasterFeedIE(InfoExtractor):
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _extract_url(ie, webpage):
|
||||||
|
mobj = re.search(
|
||||||
|
r'<(?:object|a[^>]+class=["\']webcaster-player["\'])[^>]+data(?:-config)?=(["\']).*?config=(?P<url>https?://bl\.webcaster\.pro/feed/start/free_.*?)(?:[?&]|\1)',
|
||||||
|
webpage)
|
||||||
|
if mobj:
|
||||||
|
return mobj.group('url')
|
||||||
|
for secure in (True, False):
|
||||||
|
video_url = ie._og_search_video_url(
|
||||||
|
webpage, secure=secure, default=None)
|
||||||
|
if video_url:
|
||||||
|
mobj = re.search(
|
||||||
|
r'config=(?P<url>https?://bl\.webcaster\.pro/feed/start/free_[^?&=]+)',
|
||||||
|
video_url)
|
||||||
|
if mobj:
|
||||||
|
return mobj.group('url')
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue