]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/zattoo.py
[extractor/zattoo] Fix resellers
[yt-dlp.git] / yt_dlp / extractor / zattoo.py
index 2a7e854723325fb4f4e7312dec2cc1989fbd3783..975cc71259d011ef4500ef9916d3533b8aa7cbc9 100644 (file)
@@ -237,6 +237,10 @@ def _extract_ondemand(self, ondemand_id):
             ondemand_termtoken=ondemand_termtoken, ondemand_type=ondemand_type)
         return info_dict
 
+    def _real_extract(self, url):
+        vid1, vid2 = self._match_valid_url(url).group('vid1', 'vid2')
+        return getattr(self, f'_extract_{self._TYPE}')(vid1 or vid2)
+
 
 def _make_valid_url(host):
     return rf'https?://(?:www\.)?{re.escape(host)}/watch/[^/]+?/(?P<id>[0-9]+)[^/]+(?:/(?P<recid>[0-9]+))?'
@@ -254,10 +258,6 @@ def _create_valid_url(match, qs, base_re=None):
             {match_base}
         )'''
 
-    def _real_extract(self, url):
-        vid1, vid2 = self._match_valid_url(url).group('vid1', 'vid2')
-        return getattr(self, f'_extract_{self._TYPE}')(vid1 or vid2)
-
 
 class ZattooIE(ZattooBaseIE):
     _VALID_URL = ZattooBaseIE._create_valid_url(r'\d+', 'program', '(?:program|watch)/[^/]+')