PROPLANTA: user agent

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7641 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch
2015-01-20 19:44:05 +00:00
parent 5046512b38
commit e8ce313ccf

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