aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-12-18 22:05:56 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-18 22:05:56 +0600
commit15d50aca64421c97d251bcd86e9bb308265dfdaa (patch)
tree30ebe9ff9458f9f978887dea8a6c6e45ae945129
parent7234d1d9c795bd43799de47952f65f72952e0564 (diff)
[nowness] Add support for brightcove:new videos (Closes #7884)
-rw-r--r--youtube_dl/extractor/nowness.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/youtube_dl/extractor/nowness.py b/youtube_dl/extractor/nowness.py
index d480fb58c..446f5901c 100644
--- a/youtube_dl/extractor/nowness.py
+++ b/youtube_dl/extractor/nowness.py
@@ -1,7 +1,10 @@
# encoding: utf-8
from __future__ import unicode_literals
-from .brightcove import BrightcoveLegacyIE
+from .brightcove import (
+ BrightcoveLegacyIE,
+ BrightcoveNewIE,
+)
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
@@ -23,9 +26,12 @@ class NownessBaseIE(InfoExtractor):
note='Downloading player JavaScript',
errnote='Unable to download player JavaScript')
bc_url = BrightcoveLegacyIE._extract_brightcove_url(player_code)
- if bc_url is None:
- raise ExtractorError('Could not find player definition')
- return self.url_result(bc_url, 'BrightcoveLegacy')
+ if bc_url:
+ return self.url_result(bc_url, BrightcoveLegacyIE.ie_key())
+ bc_url = BrightcoveNewIE._extract_url(player_code)
+ if bc_url:
+ return self.url_result(bc_url, BrightcoveNewIE.ie_key())
+ raise ExtractorError('Could not find player definition')
elif source == 'vimeo':
return self.url_result('http://vimeo.com/%s' % video_id, 'Vimeo')
elif source == 'youtube':