1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-21 15:38:53 +00:00

Apply suggestions from code review

This commit is contained in:
bashonly
2025-06-25 23:00:33 +00:00
committed by GitHub
parent 30c4364c19
commit 7ca024bc35
2 changed files with 7 additions and 12 deletions

View File

@@ -14,8 +14,8 @@ class NiconicoLiveFD(FileDownloader):
def real_download(self, filename, info_dict):
video_id = info_dict['id']
quality, ws_extractor, ws_url = map(
info_dict['downloader_options'].get, ('max_quality', 'ws', 'ws_url'))
opts = info_dict['downloader_options']
quality, ws_extractor, ws_url = opts['max_quality'], opts['ws'], opts['ws_url']
dl = FFmpegFD(self.ydl, self.params or {})
new_info_dict = info_dict.copy()
@@ -76,7 +76,7 @@ class NiconicoLiveFD(FileDownloader):
return
except BaseException as e:
self.to_screen(
f'[niconico:live] {video_id}: Connection error occured, reconnecting after 10 seconds: {str_or_none(e)}')
f'[niconico:live] {video_id}: Connection error occured, reconnecting after 10 seconds: {e}')
time.sleep(10)
continue
finally: