mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-11 14:18:18 +01:00
parent
b90dbe6c19
commit
3a4bb9f751
@ -17,6 +17,7 @@
|
|||||||
parse_qs,
|
parse_qs,
|
||||||
OnDemandPagedList,
|
OnDemandPagedList,
|
||||||
try_get,
|
try_get,
|
||||||
|
UnsupportedError,
|
||||||
urljoin,
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -196,11 +197,11 @@ def _real_extract(self, url):
|
|||||||
live_data = self._download_json(
|
live_data = self._download_json(
|
||||||
f'https://api.live.odysee.com/v1/odysee/live/{claim_id}', claim_id,
|
f'https://api.live.odysee.com/v1/odysee/live/{claim_id}', claim_id,
|
||||||
note='Downloading livestream JSON metadata')['data']
|
note='Downloading livestream JSON metadata')['data']
|
||||||
if not live_data['live']:
|
streaming_url = final_url = live_data.get('url')
|
||||||
raise ExtractorError('This stream is not live', expected=True)
|
if not final_url and not live_data.get('live'):
|
||||||
streaming_url = final_url = live_data['url']
|
self.raise_no_formats('This stream is not live', True, claim_id)
|
||||||
else:
|
else:
|
||||||
raise ExtractorError('Unsupported URL', expected=True)
|
raise UnsupportedError(url)
|
||||||
|
|
||||||
info = self._parse_stream(result, url)
|
info = self._parse_stream(result, url)
|
||||||
if determine_ext(final_url) == 'm3u8':
|
if determine_ext(final_url) == 'm3u8':
|
||||||
|
Loading…
Reference in New Issue
Block a user