]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/ndr.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / ndr.py
index ad8dbd7a77968fa8bfe903b184a2f370f93b237c..41ea3629a97b0ede3225356502166b22ee15c3e7 100644 (file)
@@ -218,7 +218,7 @@ def _extract_embed(self, webpage, display_id, url=None):
         }
 
 
-class NDREmbedBaseIE(InfoExtractor):
+class NDREmbedBaseIE(InfoExtractor):  # XXX: Conventionally, Concrete class names do not end in BaseIE
     IE_NAME = 'ndr:embed:base'
     _VALID_URL = r'(?:ndr:(?P<id_s>[\da-z]+)|https?://www\.ndr\.de/(?P<id>[\da-z]+)-ppjson\.json)'
     _TESTS = [{
@@ -266,7 +266,6 @@ def _real_extract(self, url):
                     ff['vcodec'] = 'none'
                     ff['ext'] = ext or 'mp3'
                 formats.append(ff)
-        self._sort_formats(formats)
 
         config = playlist['config']
 
@@ -315,7 +314,7 @@ def _real_extract(self, url):
         }
 
 
-class NDREmbedIE(NDREmbedBaseIE):
+class NDREmbedIE(NDREmbedBaseIE):  # XXX: Do not subclass from concrete IE
     IE_NAME = 'ndr:embed'
     _VALID_URL = r'https?://(?:\w+\.)*ndr\.de/(?:[^/]+/)*(?P<id>[\da-z]+)-(?:(?:ard)?player|externalPlayer)\.html'
     _TESTS = [{
@@ -413,7 +412,7 @@ class NDREmbedIE(NDREmbedBaseIE):
     }]
 
 
-class NJoyEmbedIE(NDREmbedBaseIE):
+class NJoyEmbedIE(NDREmbedBaseIE):  # XXX: Do not subclass from concrete IE
     IE_NAME = 'njoy:embed'
     _VALID_URL = r'https?://(?:www\.)?n-joy\.de/(?:[^/]+/)*(?P<id>[\da-z]+)-(?:player|externalPlayer)_[^/]+\.html'
     _TESTS = [{