aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/webcaster.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-11-27 19:56:32 +0700
committerSergey M․ <dstftw@gmail.com>2016-11-27 19:56:32 +0700
commit83f1481baae72ca17364a12bec6ebcbe30234a3f (patch)
treeb2dcaec34ad714cb05945cf4afd2aa0d533e3995 /youtube_dl/extractor/webcaster.py
parentf25e1c8d8c145ea4044b56786256cd71f861cf62 (diff)
[extractor/generic] Add support for webcaster.pro embeds
Diffstat (limited to 'youtube_dl/extractor/webcaster.py')
-rw-r--r--youtube_dl/extractor/webcaster.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/youtube_dl/extractor/webcaster.py b/youtube_dl/extractor/webcaster.py
index d366511a2..7486cb347 100644
--- a/youtube_dl/extractor/webcaster.py
+++ b/youtube_dl/extractor/webcaster.py
@@ -74,6 +74,23 @@ class WebcasterFeedIE(InfoExtractor):
'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):
video_id = self._match_id(url)