Преглед изворни кода

Pass through the age-gate warning

Zachary Kotlarek пре 12 година
родитељ
комит
94e2b8dbaa
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      yt/subscribe.pl

+ 3 - 0
yt/subscribe.pl

@@ -313,6 +313,9 @@ sub ytURL($) {
 	# Fetch metadata
 	my $meta = eval { $tube->prepare_download($id); };
 	if (!defined($meta) || ref($meta) ne 'HASH' || !exists($meta->{'video_url_map'}) || ref($meta->{'video_url_map'}) ne 'HASH') {
+		if ($@ =~ /age gate/i) {
+			print STDERR "Video not available due to age gate restrictions\n";
+		}
 		return undef();
 	}