0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-22 06:00:00 +00:00

[ie/BilibiliSpaceVideo] Better error message (#9839)

Closes #9528
Authored by: fireattack
This commit is contained in:
fireattack 2024-05-09 05:09:38 +08:00 committed by GitHub
parent df5c9e733a
commit 06d52c8731
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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):