aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/lbry.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-03-05 00:59:20 +0800
committerJesús <heckyel@hyperbola.info>2022-03-05 00:59:20 +0800
commitf4f05a6915b8683655b073654d58f70a92f96330 (patch)
treef0fb8acb7acb580030f1b0b758ad03531d6cbb39 /yt_dlp/extractor/lbry.py
parent2064247b6faafff3ee304ea6ec58495b8d9ee023 (diff)
parent72e995f1226a2fce3cd7f5fda50ebe024fe2a57e (diff)
downloadhypervideo-pre-f4f05a6915b8683655b073654d58f70a92f96330.tar.lz
hypervideo-pre-f4f05a6915b8683655b073654d58f70a92f96330.tar.xz
hypervideo-pre-f4f05a6915b8683655b073654d58f70a92f96330.zip
updated from upstream | 05/03/2022 at 00:59
Diffstat (limited to 'yt_dlp/extractor/lbry.py')
-rw-r--r--yt_dlp/extractor/lbry.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yt_dlp/extractor/lbry.py b/yt_dlp/extractor/lbry.py
index 1405ce0c7..5d5457c53 100644
--- a/yt_dlp/extractor/lbry.py
+++ b/yt_dlp/extractor/lbry.py
@@ -17,6 +17,7 @@ from ..utils import (
parse_qs,
OnDemandPagedList,
try_get,
+ UnsupportedError,
urljoin,
)
@@ -196,11 +197,11 @@ class LBRYIE(LBRYBaseIE):
live_data = self._download_json(
f'https://api.live.odysee.com/v1/odysee/live/{claim_id}', claim_id,
note='Downloading livestream JSON metadata')['data']
- if not live_data['live']:
- raise ExtractorError('This stream is not live', expected=True)
- streaming_url = final_url = live_data['url']
+ streaming_url = final_url = live_data.get('url')
+ if not final_url and not live_data.get('live'):
+ self.raise_no_formats('This stream is not live', True, claim_id)
else:
- raise ExtractorError('Unsupported URL', expected=True)
+ raise UnsupportedError(url)
info = self._parse_stream(result, url)
if determine_ext(final_url) == 'm3u8':