mirror of
https://forge.murkfall.net/bluesaxman/weatherget.git
synced 2026-03-13 02:54:22 -06:00
added silent and timeout flags to curl
This commit is contained in:
@@ -9,7 +9,7 @@ my $URL_lng = -111.93882;
|
||||
my $URL_ProID = 23;
|
||||
my $URL_StatID = "C3430";
|
||||
|
||||
my $info = `curl https://www.weatherbug.com/api/observation?lat=$URL_lat&lng=$URL_lng&providerId=$URL_ProID&stationId=$URL_StatID` or die "Error";
|
||||
my $info = `curl -sm 5 https://www.weatherbug.com/api/observation?lat=$URL_lat&lng=$URL_lng&providerId=$URL_ProID&stationId=$URL_StatID` or die "Error";
|
||||
|
||||
my $json = decode_json $info or die "Error";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use JSON;
|
||||
my $URL_lat = 40.4936;
|
||||
my $URL_lon = -111.9388;
|
||||
|
||||
my $info = `curl "https://forecast.weather.gov/MapClick.php?lat=$URL_lat&lon=$URL_lon&unit=0&lg=english&FcstType=json"` or die "Error";
|
||||
my $info = `curl -sm 5 "https://forecast.weather.gov/MapClick.php?lat=$URL_lat&lon=$URL_lon&unit=0&lg=english&FcstType=json"` or die "Error";
|
||||
|
||||
my $json = decode_json $info or die "Error";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user