Skip to content

Commit

Permalink
[ie/BilibiliSpaceVideo] Better error message (#9839)
Browse files Browse the repository at this point in the history
Closes #9528
Authored by: fireattack
  • Loading branch information
fireattack committed May 8, 2024
1 parent df5c9e7 commit 06d52c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yt_dlp/extractor/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,10 @@ def fetch_page(page_idx):
raise ExtractorError(
'Request is blocked by server (412), please add cookies, wait and try later.', expected=True)
raise
if response['code'] == -401:
if response['code'] in (-352, -401):
raise ExtractorError(
'Request is blocked by server (401), please add cookies, wait and try later.', expected=True)
f'Request is blocked by server ({-response["code"]}), '
'please add cookies, wait and try later.', expected=True)
return response['data']

def get_metadata(page_data):
Expand Down

0 comments on commit 06d52c8

Please sign in to comment.