1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-05-20 17:45:45 -05:00
Authored by: bashonly
This commit is contained in:
bashonly 2025-02-23 00:46:51 -06:00
parent 020dd14605
commit 957a21278f
No known key found for this signature in database
GPG key ID: 783F096F253D15B0

View file

@ -249,12 +249,11 @@ def _extract_web_data_and_status(self, url, video_id, fatal=True):
elif fatal:
raise ExtractorError('Unable to extract webpage video data')
if not traverse_obj(video_data, ('video', {dict})):
if traverse_obj(video_data, ('isContentClassified', {bool})):
msg = 'This post may not be comfortable for some audiences. Log in for access'
if fatal:
self.raise_login_required(msg)
self.report_warning(msg, video_id=video_id)
if not traverse_obj(video_data, ('video', {dict})) and traverse_obj(video_data, ('isContentClassified', {bool})):
msg = 'This post may not be comfortable for some audiences. Log in for access'
if fatal:
self.raise_login_required(msg)
self.report_warning(msg, video_id=video_id)
return video_data, status