Révision 2d95020d
NOAA decommissioned weather.noaa.gov
Change weather.noaa.gov -> tgftp.nws.noaa.gov
| plugins/weather/temperatures | ||
|---|---|---|
| 2 | 2 |
# |
| 3 | 3 |
# Copyright (C) 2006 Lars Strand |
| 4 | 4 |
# |
| 5 |
# Plugin to fetch temperature from weather.noaa.gov
|
|
| 5 |
# Plugin to fetch temperature from tgftp.nws.noaa.gov
|
|
| 6 | 6 |
# |
| 7 | 7 |
# Parameters supported: |
| 8 | 8 |
# |
| ... | ... | |
| 15 | 15 |
|
| 16 | 16 |
use strict; |
| 17 | 17 |
|
| 18 |
# Find areacodes here http://weather.noaa.gov/
|
|
| 18 |
# Find areacodes here http://tgftp.nws.noaa.gov/
|
|
| 19 | 19 |
my @wcode = undef; |
| 20 | 20 |
|
| 21 | 21 |
if (defined($ENV{wcode})) {
|
| ... | ... | |
| 43 | 43 |
} |
| 44 | 44 |
} |
| 45 | 45 |
|
| 46 |
my $datasource = "http://weather.noaa.gov/pub/data/observations/metar/decoded/";
|
|
| 46 |
my $datasource = "http://tgftp.nws.noaa.gov/data/observations/metar/decoded/";
|
|
| 47 | 47 |
|
| 48 | 48 |
my $ua = LWP::UserAgent->new(timeout => 30); |
| 49 | 49 |
$ua->agent('Munin');
|
Formats disponibles : Unified diff