my $dlfile;
my $dirname;
my $cookie = "";
+ my $useragent = "-H \"User-Agent: Mozilla/5.0\"";
$dlfile = sprintf($self->_getval('FILEPATTERN'),
$self->_encode($video->{'SOURCE'}),
}
$cookie = "-H \"Cookie: $video->{'COOKIE'}\"" if (defined $video->{'COOKIE'});
- my $cmdline = "( GET $cookie \"$video->{'DLURL'}\" > \"$tmpfile\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" || rm -f \"$tmpfile\" ) &";
+ my $cmdline = "( GET $useragent $cookie \"$video->{'DLURL'}\" > \"$tmpfile\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" || rm -f \"$tmpfile\" ) &";
$self->debug(encode_base64($cmdline));
system($cmdline);
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);