From d5dbdbccd34e247f52356ab1b70f594b66e21d25 Mon Sep 17 00:00:00 2001 From: grqx_wsl <173253225+grqx@users.noreply.github.com> Date: Sat, 27 Jul 2024 23:10:53 +1200 Subject: [PATCH] `_download_playinfo`: more understandable note --- yt_dlp/extractor/bilibili.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index 6b6859287..f6391e94a 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -168,10 +168,14 @@ class BilibiliBaseIE(InfoExtractor): params = {'bvid': bvid, 'cid': cid, 'fnval': 4048, **kwargs} if self.is_logged_in: params.pop('try_look', None) + if kwargs.get('qn'): + note = f'Downloading video format {kwargs["qn"]} for cid {cid}' + else: + note = f'Downloading video formats for cid {cid}' + return self._download_json( 'https://api.bilibili.com/x/player/wbi/playurl', bvid, - query=self._sign_wbi(params, bvid), headers=headers, - note=f'Downloading video formats for cid {cid} {kwargs.get("qn", "")}')['data'] + query=self._sign_wbi(params, bvid), headers=headers, note=note)['data'] def json2srt(self, json_data): srt_data = ''