diff options
Diffstat (limited to 'lib/WWW/FairViewer.pm')
-rw-r--r-- | lib/WWW/FairViewer.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm index e96ed7c..59b2a80 100644 --- a/lib/WWW/FairViewer.pm +++ b/lib/WWW/FairViewer.pm @@ -973,7 +973,7 @@ sub _extract_streaming_urls { if (defined $streamingData->{dashManifestUrl}) { say STDERR ":: Contains DASH manifest URL" if $self->get_debug; - return; + ##return; } if (exists $streamingData->{adaptiveFormats}) { @@ -989,12 +989,15 @@ sub _extract_streaming_urls { if (grep { $_->{url} =~ /\bsc=yes\b/ } @results) { say STDERR ":: Contains SC = yes" if $self->get_debug; - return; + ##return; } # Keep only streams with contentLength > 0. @results = grep { $_->{itag} == 22 or (exists($_->{contentLength}) and $_->{contentLength} > 0) } @results; + # Filter out streams with "dur=0.000" + @results = grep { $_->{url} !~ /\bdur=0\.000\b/ } @results; + # Detect livestream if (!@results and exists($json->{streamingData}) and exists($json->{streamingData}{hlsManifestUrl})) { |