Branch Coverage

blib/lib/App/Automatan/Plugin/Action/YouTube.pm
Criterion Covered Total %
branch 0 114 0.0


line true false branch
25 0 0 if $@
27 0 0 unless $video_data
29 0 0 if -e $target_file
41 0 0 if $level
78 0 0 unless exists $args{'ua'}
90 0 0 unless $video_id
98 0 0 unless $video_id
110 0 0 unless $video_id
128 0 0 defined $$args{'overwrite'} ? :
0 0 unless ref $$args{'cb'} eq 'CODE'
135 0 0 if $res->is_error
140 0 0 unless defined $filename
141 0 0 unless $$data{$1}
148 0 0 $$data{'video_url_map'}{$fmt}{'url'} ? :
155 0 0 if -f $file and not $overwrite
156 0 0 unless open my $wfh, '>', $file
159 0 0 if $verbose
164 0 0 if ($verbose or $$self{'verbose'})
168 0 0 if $total == $size
175 0 0 unless $video_id
178 0 0 if ref $$self{'cache'}{$video_id} eq 'HASH'
217 0 0 unless my($title) = $content =~ //
224 0 0 unless my($user) = $content =~ m[([^<]+)]
232 0 0 unless ($$args{'fmt_list'} and $$args{'url_encoded_fmt_stream_map'})
264 0 0 if $res->is_error
274 0 0 unless $line
275 0 0 if ($line =~ /the uploader has not made this video available in your country/i) { }
0 0 elsif ($line =~ /^.+ytplayer\.config\s*=\s*({.*})/) { }
284 0 0 unless $$data{'args'}
304 0 0 if (@s == 92) { }
0 0 elsif (@s == 90) { }
0 0 elsif (@s == 88) { }
0 0 elsif (@s == 87) { }
0 0 elsif (@s == 86) { }
0 0 elsif (@s == 85) { }
0 0 elsif (@s == 84) { }
0 0 elsif (@s == 83) { }
0 0 elsif (@s == 82) { }
0 0 elsif (@s == 81) { }
0 0 elsif (@s == 79) { }
342 0 0 unless $sig
344 0 0 unless @sig
363 0 0 unless $ua
364 0 0 unless eval { do { $ua->isa('LWP::UserAgent') } }
370 0 0 $fmt =~ /13|17/ ? :
0 0 $fmt =~ /18|22|37|38/ ? :
0 0 $fmt =~ /43|44|45/ ? :
379 0 0 unless $stuff
380 0 0 if ($stuff =~ m[/.*?[?&;!](?:v|video_id)=([^&#?=/;]+)]) { }
0 0 elsif ($stuff =~ m[/(?:e|v|embed)/([^&#?=/;]+)]) { }
0 0 elsif ($stuff =~ m[#p/(?:u|search)/\d+/([^&?/]+)]) { }
0 0 elsif ($stuff =~ m[youtu.be/([^&#?=/;]+)]) { }
399 0 0 unless $stuff
400 0 0 if ($stuff =~ m[/.*?[?&;!]list=([^&#?=/;]+)]) { }
0 0 elsif ($stuff =~ /^\s*([FP]L[\w\-]+)\s*$/) { }
411 0 0 unless $stuff
412 0 0 if ($stuff =~ m[/user/([^&#?=/;]+)])