1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 08:58:30 +00:00

Apply suggestions

This commit is contained in:
doe1080 2025-06-26 18:58:04 +09:00
parent 46a42c738a
commit 5791c83530
2 changed files with 9 additions and 3 deletions

View File

@ -262,6 +262,9 @@ class InfoExtractor:
* http_chunk_size Chunk size for HTTP downloads
* ffmpeg_args Extra arguments for ffmpeg downloader (input)
* ffmpeg_args_out Extra arguments for ffmpeg downloader (output)
* ws (NiconicoLiveFD only) WebSocketResponse
* ws_url (NiconicoLiveFD only) Websockets URL
* max_quality (NiconicoLiveFD only) Max stream quality string
* is_dash_periods Whether the format is a result of merging
multiple DASH periods.
RTMP formats can also have the additional fields: page_url,

View File

@ -30,7 +30,11 @@
urlencode_postdata,
urljoin,
)
from ..utils.traversal import find_element, traverse_obj
from ..utils.traversal import (
find_element,
require,
traverse_obj,
)
class NiconicoBaseIE(InfoExtractor):
@ -890,8 +894,7 @@ def _real_extract(self, url):
'id': video_id,
'title': title,
'downloader_options': {
'max_quality': traverse_obj(embedded_data, (
'program', 'stream', 'maxQuality', {str})),
'max_quality': traverse_obj(embedded_data, ('program', 'stream', 'maxQuality', {str})) or 'normal',
'ws': ws,
'ws_url': ws_url,
},