[nrk] Inline _extract_from_playback
authorSergey M․ <dstftw@gmail.com>
Sat, 2 Jan 2021 23:45:17 +0000 (06:45 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 2 Jan 2021 23:45:17 +0000 (06:45 +0700)
youtube_dl/extractor/nrk.py

index 5f12b0d9e51f2cdf84b3f3e687acaa0281d4e196..520206534bc5990efbdd2a876124d73e5479ce13 100644 (file)
@@ -143,7 +143,9 @@ class NRKIE(NRKBaseIE):
         'only_matching': True,
     }]
 
-    def _extract_from_playback(self, video_id):
+    def _real_extract(self, url):
+        video_id = self._match_id(url).split('/')[-1]
+
         path_templ = 'playback/%s/' + video_id
 
         def call_playback_api(item, query=None):
@@ -212,10 +214,6 @@ class NRKIE(NRKBaseIE):
             'formats': formats,
         }
 
-    def _real_extract(self, url):
-        video_id = self._match_id(url).split('/')[-1]
-        return self._extract_from_playback(video_id)
-
 
 class NRKTVIE(InfoExtractor):
     IE_DESC = 'NRK TV and NRK Radio'