aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMMM <flashdagger@googlemail.com>2022-06-19 02:10:22 +0200
committerGitHub <noreply@github.com>2022-06-18 17:10:22 -0700
commit9fde8a6b125466419745bfc2afed1f34f9821b3f (patch)
tree902d25cb14305929d98c1b1bf3a51a7e8c6cedf0
parent612e31f5ea66ccc69a6ddf0dd3a4086db7127434 (diff)
downloadhypervideo-pre-9fde8a6b125466419745bfc2afed1f34f9821b3f.tar.lz
hypervideo-pre-9fde8a6b125466419745bfc2afed1f34f9821b3f.tar.xz
hypervideo-pre-9fde8a6b125466419745bfc2afed1f34f9821b3f.zip
[extractor/lbry] Update livestream API (#4042)
Authored by: flashdagger
-rw-r--r--yt_dlp/extractor/lbry.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/extractor/lbry.py b/yt_dlp/extractor/lbry.py
index 953ce2e18..909720e8b 100644
--- a/yt_dlp/extractor/lbry.py
+++ b/yt_dlp/extractor/lbry.py
@@ -192,10 +192,11 @@ class LBRYIE(LBRYBaseIE):
claim_id, is_live = result['signing_channel']['claim_id'], True
headers = {'referer': 'https://player.odysee.live/'}
live_data = self._download_json(
- f'https://api.live.odysee.com/v1/odysee/live/{claim_id}', claim_id,
+ 'https://api.odysee.live/livestream/is_live', claim_id,
+ query={'channel_claim_id': claim_id},
note='Downloading livestream JSON metadata')['data']
- streaming_url = final_url = live_data.get('url')
- if not final_url and not live_data.get('live'):
+ streaming_url = final_url = live_data.get('VideoURL')
+ if not final_url and not live_data.get('Live'):
self.raise_no_formats('This stream is not live', True, claim_id)
else:
raise UnsupportedError(url)