[youtube] Recognize another HTML5 player URL (#12885)
[youtube-dl] / youtube_dl / extractor / nrk.py
index 13af9ed1f7395e178774036ea8ae68dab62c8570..7fe79cb539e2ce435d55891e16541fe8d2650f41 100644 (file)
@@ -15,6 +15,7 @@ from ..utils import (
 
 class NRKBaseIE(InfoExtractor):
     _GEO_COUNTRIES = ['NO']
+
     def _real_extract(self, url):
         video_id = self._match_id(url)
 
@@ -164,12 +165,12 @@ class NRKIE(NRKBaseIE):
                             https?://
                                 (?:
                                     (?:www\.)?nrk\.no/video/PS\*|
-                                    v8-psapi\.nrk\.no/mediaelement/
+                                    v8[-.]psapi\.nrk\.no/mediaelement/
                                 )
                             )
-                            (?P<id>[^/?#&]+)
+                            (?P<id>[^?#&]+)
                         '''
-    _API_HOST = 'v8.psapi.nrk.no'
+    _API_HOST = 'v8-psapi.nrk.no'
     _TESTS = [{
         # video
         'url': 'http://www.nrk.no/video/PS*150533',
@@ -195,6 +196,9 @@ class NRKIE(NRKBaseIE):
     }, {
         'url': 'nrk:ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
         'only_matching': True,
+    }, {
+        'url': 'nrk:clip/7707d5a3-ebe7-434a-87d5-a3ebe7a34a70',
+        'only_matching': True,
     }, {
         'url': 'https://v8-psapi.nrk.no/mediaelement/ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
         'only_matching': True,