Perl - downloading flash video
I trying to downloaded video from this link using the Perl script. But the problem I unable to play the video after downloading. Here is my script
my $ua = LWP::UserAgent->new;
open(FILE, '>Test.flv');
binmode (FILE);
my $resp = $ua->get( $url
) or die;
if ( $resp->is_success)
{
开发者_运维百科 print FILE $resp->content;
close(FILE);
}
else
{
print "Failed\n";
}
Please let me know whats wrong with the code. Thanks in advance.
For me, this doesn't seem to work in firefox either, so I guess there's something wrong with the link. Your program looks OK to me, though using LWP::Simple would make thing a bit more trivial.
精彩评论