]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/rockstargames.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / rockstargames.py
index cd6904bc935ef4c3a308cee47cff56602a8de691..02abd482c8d04fb4b65821d37fbdb9002d01b42b 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..utils import (
     int_or_none,
@@ -9,6 +6,7 @@
 
 
 class RockstarGamesIE(InfoExtractor):
+    _WORKING = False
     _VALID_URL = r'https?://(?:www\.)?rockstargames\.com/videos(?:/video/|#?/?\?.*\bvideo=)(?P<id>\d+)'
     _TESTS = [{
         'url': 'https://www.rockstargames.com/videos/video/11544/',
@@ -21,7 +19,7 @@ class RockstarGamesIE(InfoExtractor):
             'thumbnail': r're:^https?://.*\.jpg$',
             'timestamp': 1464876000,
             'upload_date': '20160602',
-        }
+        },
     }, {
         'url': 'http://www.rockstargames.com/videos#/?video=48',
         'only_matching': True,
@@ -40,14 +38,14 @@ def _real_extract(self, url):
         title = video['title']
 
         formats = []
-        for video in video['files_processed']['video/mp4']:
-            if not video.get('src'):
+        for v in video['files_processed']['video/mp4']:
+            if not v.get('src'):
                 continue
-            resolution = video.get('resolution')
+            resolution = v.get('resolution')
             height = int_or_none(self._search_regex(
                 r'^(\d+)[pP]$', resolution or '', 'height', default=None))
             formats.append({
-                'url': self._proto_relative_url(video['src']),
+                'url': self._proto_relative_url(v['src']),
                 'format_id': resolution,
                 'height': height,
             })
@@ -57,8 +55,6 @@ def _real_extract(self, url):
             if youtube_id:
                 return self.url_result(youtube_id, 'Youtube')
 
-        self._sort_formats(formats)
-
         return {
             'id': video_id,
             'title': title,