diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-10-19 03:02:14 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-10-19 03:02:14 +0700 |
commit | 853a71b628bbf1626c301dc66f496464ad796b2e (patch) | |
tree | 24c976c955c7282b9d053b532db6452c41dfc514 | |
parent | e2628fb6a028bd48f39ee556ca5ecb07aceba7f5 (diff) |
[nrk] Improve _VALID_URL
-rw-r--r-- | youtube_dl/extractor/nrk.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py index c30428208..3700b7ab2 100644 --- a/youtube_dl/extractor/nrk.py +++ b/youtube_dl/extractor/nrk.py @@ -113,7 +113,17 @@ class NRKBaseIE(InfoExtractor): class NRKIE(NRKBaseIE): - _VALID_URL = r'(?:nrk:|https?://(?:www\.)?nrk\.no/video/PS\*)(?P<id>[^/?#&]+)' + _VALID_URL = r'''(?x) + (?: + nrk:| + https?:// + (?: + (?:www\.)?nrk\.no/video/PS\*| + v8-psapi\.nrk\.no/mediaelement/ + ) + ) + (?P<id>[^/?#&]+) + ''' _API_HOST = 'v8.psapi.nrk.no' _TESTS = [{ # video @@ -140,6 +150,9 @@ class NRKIE(NRKBaseIE): }, { 'url': 'nrk:ecc1b952-96dc-4a98-81b9-5296dc7a98d9', 'only_matching': True, + }, { + 'url': 'https://v8-psapi.nrk.no/mediaelement/ecc1b952-96dc-4a98-81b9-5296dc7a98d9', + 'only_matching': True, }] |