mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
[nowness] Add support for brightcove:new videos (Closes #7884)
This commit is contained in:
parent
7234d1d9c7
commit
15d50aca64
|
@ -1,7 +1,10 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .brightcove import BrightcoveLegacyIE
|
from .brightcove import (
|
||||||
|
BrightcoveLegacyIE,
|
||||||
|
BrightcoveNewIE,
|
||||||
|
)
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_str
|
from ..compat import compat_str
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
@ -23,9 +26,12 @@ class NownessBaseIE(InfoExtractor):
|
||||||
note='Downloading player JavaScript',
|
note='Downloading player JavaScript',
|
||||||
errnote='Unable to download player JavaScript')
|
errnote='Unable to download player JavaScript')
|
||||||
bc_url = BrightcoveLegacyIE._extract_brightcove_url(player_code)
|
bc_url = BrightcoveLegacyIE._extract_brightcove_url(player_code)
|
||||||
if bc_url is None:
|
if bc_url:
|
||||||
raise ExtractorError('Could not find player definition')
|
return self.url_result(bc_url, BrightcoveLegacyIE.ie_key())
|
||||||
return self.url_result(bc_url, 'BrightcoveLegacy')
|
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':
|
elif source == 'vimeo':
|
||||||
return self.url_result('http://vimeo.com/%s' % video_id, 'Vimeo')
|
return self.url_result('http://vimeo.com/%s' % video_id, 'Vimeo')
|
||||||
elif source == 'youtube':
|
elif source == 'youtube':
|
||||||
|
|
Loading…
Reference in a new issue