Skip to content

Commit 416fe5c

Browse files
committed
- Keep only streams with contentLength > 0.
1 parent f68b178 commit 416fe5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/WWW/YoutubeViewer.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,9 @@ sub _extract_streaming_urls {
728728
# Cipher streaming URLs are currently unsupported, so let's filter them out.
729729
@results = grep { not exists $_->{cipher} } @results;
730730

731+
# Keep only streams with contentLength > 0.
732+
@results = grep { exists($_->{contentLength}) and $_->{contentLength} > 0 } @results;
733+
731734
if ($self->get_debug) {
732735
my $count = scalar(@results);
733736
say STDERR ":: Found $count streaming URLs...";

0 commit comments

Comments
 (0)