1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

handle censorship status

Authored by: bashonly
This commit is contained in:
bashonly 2025-02-22 17:27:06 -06:00
parent 4a4aabe374
commit d58f43af50
No known key found for this signature in database
GPG key ID: 783F096F253D15B0

View file

@ -910,6 +910,8 @@ def _real_extract(self, url):
return self._parse_aweme_video_web(video_data, url, video_id) return self._parse_aweme_video_web(video_data, url, video_id)
elif status == 10216: elif status == 10216:
raise ExtractorError('This video is private', expected=True) raise ExtractorError('This video is private', expected=True)
elif status == 10204:
raise ExtractorError('This post is unavailable in your region', expected=True)
raise ExtractorError(f'Video not available, status code {status}', video_id=video_id) raise ExtractorError(f'Video not available, status code {status}', video_id=video_id)