From da4c53789ce647dfbc90098ead132c6768473a5a Mon Sep 17 00:00:00 2001 From: dubber0 Date: Fri, 21 Jul 2017 15:26:32 +0200 Subject: [PATCH 1/3] [npo] added npo3 support --- youtube_dl/extractor/npo.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 516b1e941..550f6b489 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -28,7 +28,7 @@ class NPOBaseIE(InfoExtractor): class NPOIE(NPOBaseIE): IE_NAME = 'npo' - IE_DESC = 'npo.nl and ntr.nl' + IE_DESC = 'npo.nl, npo3.nl and ntr.nl' _VALID_URL = r'''(?x) (?: npo:| @@ -36,6 +36,7 @@ class NPOIE(NPOBaseIE): (?:www\.)? (?: npo\.nl/(?!(?:live|radio)/)(?:[^/]+/){2}| + npo3\.nl/(?!/)(?:[^/]+/){2}| ntr\.nl/(?:[^/]+/){2,}| omroepwnl\.nl/video/fragment/[^/]+__| zapp\.nl/[^/]+/[^/]+/ @@ -88,6 +89,17 @@ class NPOIE(NPOBaseIE): 'params': { 'skip_download': True, } + }, { + 'url': 'https://www.npo3.nl/3onderzoekt/16-09-2015/VPWON_1239870', + 'md5': '5196e6b895a779445a610f1f4c4145e7', + 'info_dict': { + 'id': 'VPWON_1239870', + 'ext': 'm4v', + 'title': '3Onderzoekt: Krakers', + 'description': 'md5:0f79d45e282659ba4be99b125196b6af', + 'upload_date': '20150916', + 'duration': 1514, + }, }, { # non asf in streams 'url': 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771', From ccdf9d663cb590e7d21e8616fd40b6e8e3032fae Mon Sep 17 00:00:00 2001 From: dubber0 Date: Fri, 21 Jul 2017 18:50:41 +0200 Subject: [PATCH 2/3] [npo] made test only_matching and removed unnecessary regex --- youtube_dl/extractor/npo.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 550f6b489..acdbc0e29 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -36,7 +36,7 @@ class NPOIE(NPOBaseIE): (?:www\.)? (?: npo\.nl/(?!(?:live|radio)/)(?:[^/]+/){2}| - npo3\.nl/(?!/)(?:[^/]+/){2}| + npo3\.nl/(?:[^/]+/){2}| ntr\.nl/(?:[^/]+/){2,}| omroepwnl\.nl/video/fragment/[^/]+__| zapp\.nl/[^/]+/[^/]+/ @@ -91,15 +91,7 @@ class NPOIE(NPOBaseIE): } }, { 'url': 'https://www.npo3.nl/3onderzoekt/16-09-2015/VPWON_1239870', - 'md5': '5196e6b895a779445a610f1f4c4145e7', - 'info_dict': { - 'id': 'VPWON_1239870', - 'ext': 'm4v', - 'title': '3Onderzoekt: Krakers', - 'description': 'md5:0f79d45e282659ba4be99b125196b6af', - 'upload_date': '20150916', - 'duration': 1514, - }, + 'only_matching': True, }, { # non asf in streams 'url': 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771', From e57b6b17ecfdc36a831fd080670e31f9c7230fb2 Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sat, 22 Jul 2017 19:15:16 +0700 Subject: [PATCH 3/3] Update npo.py --- youtube_dl/extractor/npo.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index acdbc0e29..fa4ef20c5 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -28,7 +28,7 @@ class NPOBaseIE(InfoExtractor): class NPOIE(NPOBaseIE): IE_NAME = 'npo' - IE_DESC = 'npo.nl, npo3.nl and ntr.nl' + IE_DESC = 'npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl' _VALID_URL = r'''(?x) (?: npo:| @@ -36,10 +36,9 @@ class NPOIE(NPOBaseIE): (?:www\.)? (?: npo\.nl/(?!(?:live|radio)/)(?:[^/]+/){2}| - npo3\.nl/(?:[^/]+/){2}| ntr\.nl/(?:[^/]+/){2,}| omroepwnl\.nl/video/fragment/[^/]+__| - zapp\.nl/[^/]+/[^/]+/ + (?:zapp|npo3)\.nl/(?:[^/]+/){2} ) ) (?P[^/?#]+) @@ -89,9 +88,6 @@ class NPOIE(NPOBaseIE): 'params': { 'skip_download': True, } - }, { - 'url': 'https://www.npo3.nl/3onderzoekt/16-09-2015/VPWON_1239870', - 'only_matching': True, }, { # non asf in streams 'url': 'http://www.npo.nl/hoe-gaat-europa-verder-na-parijs/10-01-2015/WO_NOS_762771', @@ -150,6 +146,9 @@ class NPOIE(NPOBaseIE): }, { 'url': 'http://www.zapp.nl/beste-vrienden-quiz/extra-video-s/WO_NTR_1067990', 'only_matching': True, + }, { + 'url': 'https://www.npo3.nl/3onderzoekt/16-09-2015/VPWON_1239870', + 'only_matching': True, }, { # live stream 'url': 'npo:LI_NL1_4188102',