1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

[cleanup] Add more ruff rules (#10149)

Authored by: seproDev

Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com>
Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
sepro
2024-06-12 01:09:58 +02:00
committed by GitHub
parent db50f19d76
commit add96eb9f8
915 changed files with 7027 additions and 7246 deletions

View File

@ -174,8 +174,7 @@ class TMZIE(InfoExtractor):
# 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 @@ class TMZIE(InfoExtractor):
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