diff options
author | Sergey M․ <[email protected]> | 2016-03-02 20:57:04 +0600 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2016-03-02 20:57:04 +0600 |
commit | 61140904184f3fe84eea21e698c64d6b4fe7c889 (patch) | |
tree | c050b8b587c19741debc748adac3002bdd3db80e /youtube_dl/extractor/nrk.py | |
parent | 3099b3127684d1386101e86005feb18c29136a81 (diff) | |
download | youtube-dl-61140904184f3fe84eea21e698c64d6b4fe7c889.tar.gz youtube-dl-61140904184f3fe84eea21e698c64d6b4fe7c889.zip |
[nrk:skole] Relax _VALID_URL
Diffstat (limited to 'youtube_dl/extractor/nrk.py')
-rw-r--r-- | youtube_dl/extractor/nrk.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py index 4ede1a362..3b21fbd4d 100644 --- a/youtube_dl/extractor/nrk.py +++ b/youtube_dl/extractor/nrk.py @@ -4,7 +4,10 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..compat import compat_urlparse +from ..compat import ( + compat_urlparse, + compat_urllib_parse_unquote, +) from ..utils import ( determine_ext, ExtractorError, @@ -128,7 +131,7 @@ class NRKPlaylistIE(InfoExtractor): class NRKSkoleIE(InfoExtractor): IE_DESC = 'NRK Skole' - _VALID_URL = r'https?://(?:www\.)?nrk\.no/skole/klippdetalj?.*\btopic=nrk(?::|%3[Aa])klipp(?:/|%2[Ff])(?P<id>\d+)' + _VALID_URL = r'https?://(?:www\.)?nrk\.no/skole/klippdetalj?.*\btopic=(?P<id>[^/?#&]+)' _TESTS = [{ 'url': 'http://nrk.no/skole/klippdetalj?topic=nrk:klipp/616532', @@ -143,10 +146,13 @@ class NRKSkoleIE(InfoExtractor): }, { 'url': 'http://www.nrk.no/skole/klippdetalj?topic=nrk%3Aklipp%2F616532#embed', 'only_matching': True, + }, { + 'url': 'http://www.nrk.no/skole/klippdetalj?topic=urn:x-mediadb:21379', + 'only_matching': True, }] def _real_extract(self, url): - video_id = self._match_id(url) + video_id = compat_urllib_parse_unquote(self._match_id(url)) webpage = self._download_webpage(url, video_id) |