Skip to content

Commit 321d15e

Browse files
committed
watch: fix age restricted related message
Only print the message if info.get('age_restricted') is truthy.
1 parent 992e3ab commit 321d15e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

youtube/watch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
446446

447447
# Age restricted video, retry
448448
if not settings.allow_age_restricted_content:
449-
print('Age restricted content is not allowed.')
449+
if info.get('age_restricted'):
450+
print('Age restricted content is not allowed.')
450451
else:
451452
if info['age_restricted'] or info['player_urls_missing']:
452453
if info['age_restricted']:

0 commit comments

Comments
 (0)