my $dlfile;
my $dirname;
my $cookie = "";
+ my $useragent = "--user-agent=Mozilla/5.0";
$dlfile = sprintf($self->_getval('FILEPATTERN'),
$self->_encode($video->{'SOURCE'}),
}
$cookie = "--header=\"Cookie: $video->{'COOKIE'}\"" if (defined $video->{'COOKIE'});
- my $cmdline = "( wget -q -O\"$tmpfile\" $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" && touch \"$dlfile\" || rm -f \"$tmpfile\" ) &";
+ my $cmdline = "( wget -q -O\"$tmpfile\" $useragent $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" && touch \"$dlfile\" || rm -f \"$tmpfile\" ) &";
$self->debug("Going to execute: %s", $cmdline);
system($cmdline);