aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-01 22:21:13 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-01 22:21:13 +0700
commit4b8a984c67cdc1b2bfde77398d74096406db9644 (patch)
tree39ddd5897643110809cb8ec78d40c4374498e302
parent83e8fce628e810e2a5639ef9a21be839526512fb (diff)
downloadyoutube-dl-4b8a984c67cdc1b2bfde77398d74096406db9644.tar.xz
[npo] Add support for audio
-rw-r--r--youtube_dl/extractor/npo.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py
index be10fc486..38fefe492 100644
--- a/youtube_dl/extractor/npo.py
+++ b/youtube_dl/extractor/npo.py
@@ -126,6 +126,18 @@ class NPOIE(NPOBaseIE):
'skip_download': True,
}
}, {
+ # audio
+ 'url': 'http://www.npo.nl/jouw-stad-rotterdam/29-01-2017/RBX_FUNX_6683215/RBX_FUNX_7601437',
+ 'info_dict': {
+ 'id': 'RBX_FUNX_6683215',
+ 'ext': 'mp3',
+ 'title': 'Jouw Stad Rotterdam',
+ 'description': 'md5:db251505244f097717ec59fabc372d9f',
+ },
+ 'params': {
+ 'skip_download': True,
+ }
+ }, {
'url': 'http://www.zapp.nl/de-bzt-show/gemist/KN_1687547',
'only_matching': True,
}, {
@@ -193,7 +205,7 @@ class NPOIE(NPOBaseIE):
})
# Example: http://www.npo.nl/de-nieuwe-mens-deel-1/21-07-2010/WO_VPRO_043706
- if item.get('contentType') == 'url':
+ if item.get('contentType') in ('url', 'audio'):
add_format_url(item_url)
continue
@@ -201,7 +213,7 @@ class NPOIE(NPOBaseIE):
stream_info = self._download_json(
item_url + '&type=json', video_id,
'Downloading %s stream JSON'
- % item.get('label') or format_id or num)
+ % item.get('label') or item.get('format') or format_id or num)
except ExtractorError as ee:
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 404:
error = (self._parse_json(