diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
commit | 137f07c27a88b07df57df5b2cdebebe3c7722bac (patch) | |
tree | 4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/lbry.py | |
parent | Adding debian version 2024.05.27-1. (diff) | |
download | yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip |
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/lbry.py')
-rw-r--r-- | yt_dlp/extractor/lbry.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/yt_dlp/extractor/lbry.py b/yt_dlp/extractor/lbry.py index dcb44d0..c764d49 100644 --- a/yt_dlp/extractor/lbry.py +++ b/yt_dlp/extractor/lbry.py @@ -24,7 +24,7 @@ from ..utils import ( class LBRYBaseIE(InfoExtractor): _BASE_URL_REGEX = r'(?x)(?:https?://(?:www\.)?(?:lbry\.tv|odysee\.com)/|lbry://)' _CLAIM_ID_REGEX = r'[0-9a-f]{1,40}' - _OPT_CLAIM_ID = '[^$@:/?#&]+(?:[:#]%s)?' % _CLAIM_ID_REGEX + _OPT_CLAIM_ID = f'[^$@:/?#&]+(?:[:#]{_CLAIM_ID_REGEX})?' _SUPPORTED_STREAM_TYPES = ['video', 'audio'] _PAGE_SIZE = 50 @@ -35,7 +35,7 @@ class LBRYBaseIE(InfoExtractor): headers['x-lbry-auth-token'] = token response = self._download_json( 'https://api.lbry.tv/api/v1/proxy', - display_id, 'Downloading %s JSON metadata' % resource, + display_id, f'Downloading {resource} JSON metadata', headers=headers, data=json.dumps({ 'method': method, @@ -54,7 +54,7 @@ class LBRYBaseIE(InfoExtractor): def _permanent_url(self, url, claim_name, claim_id): return urljoin( url.replace('lbry://', 'https://lbry.tv/'), - '/%s:%s' % (claim_name, claim_id)) + f'/{claim_name}:{claim_id}') def _parse_stream(self, stream, url): stream_type = traverse_obj(stream, ('value', 'stream_type', {str})) @@ -169,9 +169,9 @@ class LBRYIE(LBRYBaseIE): 'lbc', 'lbry', 'start', - 'tutorial' + 'tutorial', ], - } + }, }, { # Audio 'url': 'https://lbry.tv/@LBRYFoundation:0/Episode-1:e', @@ -194,7 +194,7 @@ class LBRYIE(LBRYBaseIE): 'thumbnail': 'https://spee.ch/d/0bc63b0e6bf1492d.png', 'license': 'None', 'uploader_id': '@LBRYFoundation', - } + }, }, { 'url': 'https://odysee.com/@gardeningincanada:b/plants-i-will-never-grow-again.-the:e', 'md5': 'c35fac796f62a14274b4dc2addb5d0ba', @@ -216,7 +216,7 @@ class LBRYIE(LBRYBaseIE): 'formats': 'mincount:3', 'thumbnail': 'https://thumbnails.lbry.com/AgHSc_HzrrE', 'license': 'Copyrighted (contact publisher)', - } + }, }, { # HLS live stream (might expire) 'url': 'https://odysee.com/@RT:fd/livestream_RT:d', @@ -239,7 +239,7 @@ class LBRYIE(LBRYBaseIE): 'license': 'None', 'uploader_id': '@RT', }, - 'params': {'skip_download': True} + 'params': {'skip_download': True}, }, { # original quality format w/higher resolution than HLS formats 'url': 'https://odysee.com/@wickedtruths:2/Biotechnological-Invasion-of-Skin-(April-2023):4', |