]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/r7.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / r7.py
index f067a0571b4e10a2bdb166f33d42e8dbea32274b..79a4c0a125e861b4a1d3bf16874dd0c1ebdc6da8 100644 (file)
@@ -3,6 +3,8 @@
 
 
 class R7IE(InfoExtractor):
+    _WORKING = False
+    _ENABLED = None  # XXX: pass through to GenericIE
     _VALID_URL = r'''(?x)
                         https?://
                         (?:
@@ -40,7 +42,7 @@ def _real_extract(self, url):
         video_id = self._match_id(url)
 
         video = self._download_json(
-            'http://player-api.r7.com/video/i/%s' % video_id, video_id)
+            f'http://player-api.r7.com/video/i/{video_id}', video_id)
 
         title = video['title']
 
@@ -86,6 +88,8 @@ def _real_extract(self, url):
 
 
 class R7ArticleIE(InfoExtractor):
+    _WORKING = False
+    _ENABLED = None  # XXX: pass through to GenericIE
     _VALID_URL = r'https?://(?:[a-zA-Z]+)\.r7\.com/(?:[^/]+/)+[^/?#&]+-(?P<id>\d+)'
     _TEST = {
         'url': 'http://tv.r7.com/record-play/balanco-geral/videos/policiais-humilham-suspeito-a-beira-da-morte-morre-com-dignidade-16102015',
@@ -94,7 +98,7 @@ class R7ArticleIE(InfoExtractor):
 
     @classmethod
     def suitable(cls, url):
-        return False if R7IE.suitable(url) else super(R7ArticleIE, cls).suitable(url)
+        return False if R7IE.suitable(url) else super().suitable(url)
 
     def _real_extract(self, url):
         display_id = self._match_id(url)
@@ -105,4 +109,4 @@ def _real_extract(self, url):
             r'<div[^>]+(?:id=["\']player-|class=["\']embed["\'][^>]+id=["\'])([\da-f]{24})',
             webpage, 'video id')
 
-        return self.url_result('http://player.r7.com/video/i/%s' % video_id, R7IE.ie_key())
+        return self.url_result(f'http://player.r7.com/video/i/{video_id}', R7IE.ie_key())