diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-02-23 17:13:03 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-02-23 17:13:03 +0100 |
commit | bfc993cc9183d5f001e30267551bcdf9f0a98be9 (patch) | |
tree | 9408dc1e760394afdf8cbf6f48157ec22d7f3a74 /youtube_dl/extractor/npo.py | |
parent | 4432db35d9ddd0e6777df6c596d8637514ba0b56 (diff) | |
parent | b531cfc019576b682f930bd269f68eb87cfd5abf (diff) |
Merge branch 'subtitles-rework'
(Closes PR #4964)
Diffstat (limited to 'youtube_dl/extractor/npo.py')
-rw-r--r-- | youtube_dl/extractor/npo.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index c075618e8..9c01eb0af 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -1,6 +1,5 @@ from __future__ import unicode_literals -from .subtitles import SubtitlesInfoExtractor from .common import InfoExtractor from ..utils import ( fix_xml_ampersands, @@ -12,7 +11,7 @@ from ..utils import ( ) -class NPOBaseIE(SubtitlesInfoExtractor): +class NPOBaseIE(InfoExtractor): def _get_token(self, video_id): token_page = self._download_webpage( 'http://ida.omroep.nl/npoplayer/i.js', @@ -164,13 +163,10 @@ class NPOIE(NPOBaseIE): subtitles = {} if metadata.get('tt888') == 'ja': - subtitles['nl'] = 'http://e.omroep.nl/tt888/%s' % video_id - - if self._downloader.params.get('listsubtitles', False): - self._list_available_subtitles(video_id, subtitles) - return - - subtitles = self.extract_subtitles(video_id, subtitles) + subtitles['nl'] = [{ + 'ext': 'vtt', + 'url': 'http://e.omroep.nl/tt888/%s' % video_id, + }] return { 'id': video_id, |