]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/tmz.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / tmz.py
index edd16bc5b29c85b304c6e3eeaf8a586681152b29..c9f23a867898258a65090b57baaa1e7c1d966e5b 100644 (file)
@@ -174,8 +174,7 @@ def _real_extract(self, url):
             # see https://developers.google.com/youtube/iframe_api_reference#Video_Queueing_Functions
             match_obj = re.search(r'\.cueVideoById\(\s*(?P<quote>[\'"])(?P<id>.*?)(?P=quote)', webpage)
             if match_obj:
-                res = self.url_result(match_obj.group('id'))
-                return res
+                return self.url_result(match_obj.group('id'))
             # try to extract from twitter
             blockquote_el = get_element_by_attribute('class', 'twitter-tweet', webpage)
             if blockquote_el:
@@ -185,8 +184,7 @@ def _real_extract(self, url):
                 if matches:
                     for _, match in matches:
                         if '/status/' in match:
-                            res = self.url_result(match)
-                            return res
+                            return self.url_result(match)
             raise ExtractorError('No video found!')
         if id not in jsonld:
             jsonld['id'] = url