1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-12 12:35:15 +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

@@ -41,7 +41,7 @@ def _parse_japanese_duration(text):
mobj = re.search(r'(?:(\d+)日間?)?(?:(\d+)時間?)?(?:(\d+)分)?(?:(\d+)秒)?', re.sub(r'[\s\u3000]+', '', text or ''))
if not mobj:
return
days, hours, mins, secs = [int_or_none(x, default=0) for x in mobj.groups()]
days, hours, mins, secs = (int_or_none(x, default=0) for x in mobj.groups())
return secs + mins * 60 + hours * 60 * 60 + days * 24 * 60 * 60
@@ -142,10 +142,10 @@ class ShugiinItvVodIE(ShugiinItvBaseIE):
'title': 'ウクライナ大統領国会演説(オンライン)',
'release_date': '20220323',
'chapters': 'count:4',
}
},
}, {
'url': 'https://www.shugiintv.go.jp/en/index.php?ex=VL&media_type=&deli_id=53846',
'only_matching': True
'only_matching': True,
}]
def _real_extract(self, url):
@@ -232,7 +232,7 @@ class SangiinIE(InfoExtractor):
'is_live': True,
},
'skip': 'this live is turned into archive after it ends',
}, ]
}]
def _real_extract(self, url):
video_id = self._match_id(url)