我試圖使用Perl腳本從此link下載視頻。但是下載後無法播放視頻的問題。這是我的腳本Perl - 下載Flash視頻
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";
}
請讓我知道什麼是錯的代碼。提前致謝。
請不要使用舊式打開。用«打開我的$ fh','<:raw','Test.flv'替換前兩行將是非常可取的。 –