Previous updates
This commit is contained in:
parent
00d601fca5
commit
a3809de919
9
new.pl
9
new.pl
@ -65,9 +65,14 @@ foreach my $station (@stations) {
|
|||||||
my $leveldata = from_json($1);
|
my $leveldata = from_json($1);
|
||||||
|
|
||||||
$stationname = $stationdata->{'name'};
|
$stationname = $stationdata->{'name'};
|
||||||
$level = $leveldata->[0]->{_};
|
# $level = $leveldata->[0]->{_};
|
||||||
|
$res->content =~ m~Latest recorded level <strong class="bold-small">(-?[\d\.]+)m~;
|
||||||
|
$level = $1;
|
||||||
# $res->content =~ m~Recorded at (.*)~;
|
# $res->content =~ m~Recorded at (.*)~;
|
||||||
$lastupdate = UnixDate($leveldata->[0]->{ts}, "%Y-%m-%dT%T.000Z");
|
$res->content =~ m~Recorded at ([^<]+)<~;
|
||||||
|
my $lastupdate_str = $1;
|
||||||
|
$lastupdate = UnixDate($lastupdate_str, "%Y-%m-%dT%T.000Z");
|
||||||
|
# $lastupdate = UnixDate($leveldata->[0]->{ts}, "%Y-%m-%dT%T.000Z");
|
||||||
|
|
||||||
print STDERR "[$station] $stationname is $level at $lastupdate\n" if $ENV{R_DEBUG};
|
print STDERR "[$station] $stationname is $level at $lastupdate\n" if $ENV{R_DEBUG};
|
||||||
if($ENV{R_GPLOT}) {
|
if($ENV{R_GPLOT}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user