aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/nhk.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-01-25 04:04:58 +0700
committerSergey M․ <dstftw@gmail.com>2019-01-25 04:04:58 +0700
commit0eba178fce80923515f4a9ac411e46648a19d78c (patch)
tree7e700c5f2e7d8481ec47822fe08d9df6b195bc4e /youtube_dl/extractor/nhk.py
parenteb35b163adf61f8ff0ee6c504e98bc94db16e705 (diff)
[nhk] Extend _VALID_URL (closes #18968)
Diffstat (limited to 'youtube_dl/extractor/nhk.py')
-rw-r--r--youtube_dl/extractor/nhk.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/nhk.py b/youtube_dl/extractor/nhk.py
index 5c8cd76dc..d4acbcc3e 100644
--- a/youtube_dl/extractor/nhk.py
+++ b/youtube_dl/extractor/nhk.py
@@ -5,8 +5,8 @@ from ..utils import ExtractorError
class NhkVodIE(InfoExtractor):
- _VALID_URL = r'https?://www3\.nhk\.or\.jp/nhkworld/en/vod/(?P<id>[^/]+/[^/?#&]+)'
- _TEST = {
+ _VALID_URL = r'https?://www3\.nhk\.or\.jp/nhkworld/en/(?:vod|ondemand)/(?P<id>[^/]+/[^/?#&]+)'
+ _TESTS = [{
# Videos available only for a limited period of time. Visit
# http://www3.nhk.or.jp/nhkworld/en/vod/ for working samples.
'url': 'http://www3.nhk.or.jp/nhkworld/en/vod/tokyofashion/20160815',
@@ -19,7 +19,10 @@ class NhkVodIE(InfoExtractor):
'episode': 'The Kimono as Global Fashion',
},
'skip': 'Videos available only for a limited period of time',
- }
+ }, {
+ 'url': 'https://www3.nhk.or.jp/nhkworld/en/ondemand/video/2015173/',
+ 'only_matching': True,
+ }]
_API_URL = 'http://api.nhk.or.jp/nhkworld/vodesdlist/v1/all/all/all.json?apikey=EJfK8jdS57GqlupFgAfAAwr573q01y6k'
def _real_extract(self, url):