diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index df34700033..b38c90b1d1 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -1045,7 +1045,8 @@ def fetch_page(page_idx): try: response = self._download_json('https://api.bilibili.com/x/space/wbi/arc/search', - playlist_id, note=f'Downloading page {page_idx}', query=query) + playlist_id, note=f'Downloading page {page_idx}', query=query, + headers={'referer': url}) except ExtractorError as e: if isinstance(e.cause, HTTPError) and e.cause.status == 412: raise ExtractorError(