mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-14 04:05:16 +00:00
require
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
@@ -794,11 +794,7 @@ class NiconicoLiveIE(NiconicoBaseIE):
|
|||||||
{extract_attributes}, 'data-props', {json.loads}))
|
{extract_attributes}, 'data-props', {json.loads}))
|
||||||
frontend_id = traverse_obj(embedded_data, ('site', 'frontendId', {str_or_none}), default='9')
|
frontend_id = traverse_obj(embedded_data, ('site', 'frontendId', {str_or_none}), default='9')
|
||||||
|
|
||||||
if not (ws_url := traverse_obj(embedded_data, (
|
ws_url = traverse_obj(embedded_data, ('site', 'relive', 'webSocketUrl', {url_or_none}, {require('websocket URL')}))
|
||||||
'site', 'relive', 'webSocketUrl', {url_or_none},
|
|
||||||
))):
|
|
||||||
raise ExtractorError('Unable to fetch WebSocket URL', expected=True)
|
|
||||||
|
|
||||||
ws_url = update_url_query(ws_url, {'frontend_id': frontend_id})
|
ws_url = update_url_query(ws_url, {'frontend_id': frontend_id})
|
||||||
ws = self._request_webpage(
|
ws = self._request_webpage(
|
||||||
ws_url, video_id, 'Connecting to WebSocket server',
|
ws_url, video_id, 'Connecting to WebSocket server',
|
||||||
|
|||||||
Reference in New Issue
Block a user