2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 08:36:24 +00:00

PROPLANTA: user agent

git-svn-id: https://svn.fhem.de/fhem/trunk@7641 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2015-01-20 19:44:05 +00:00
parent f4a64113fc
commit edac262b2f

View File

@ -492,7 +492,8 @@ sub PROPLANTA_HtmlAcquire($$)
PROPLANTA_Log $hash, 4, "Start capturing of $URL";
my $err_log = "";
my $agent = LWP::UserAgent->new( env_proxy => 1, keep_alive => 1, protocols_allowed => ['http'], timeout => 10 );
my $agent = LWP::UserAgent->new( env_proxy => 1, keep_alive => 1, protocols_allowed => ['http'], timeout => 10
, agent => "Mozilla/5.0 (Windows NT 5.1) [de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4]" );
my $request = HTTP::Request->new( GET => $URL );
my $response = $agent->request($request);
$err_log = "Can't get $URL -- " . $response->status_line