1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

add referer

This commit is contained in:
c-basalt 2024-05-10 17:05:27 -04:00
parent 98d71d8c5e
commit 9bb6a7e4f3

View File

@ -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(