Skip to content

Commit

Permalink
Made regexp extracting GFS directy names more robust.
Browse files Browse the repository at this point in the history
Issue 1409: It seems the directory listing HTML changed, and this
caused the regexp extracting the GFS directory names to capture
HTML elements, thus making the names always invalid.

Resolves #1409.
Resolves #1410 (PR).
  • Loading branch information
wwlwpd committed Nov 1, 2024
1 parent cd0a8ae commit 660d147
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/get_gfs_status.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
my $url = sprintf( qq{https://ftp.ncep.noaa.gov/%s}, $dir );
my $res = $ua->get($url);
my $raw_listing = $res->{content};
my @dirs = ( $raw_listing =~ m/>(.+)\/</g );
my @dirs = ( $raw_listing =~ m/>(gfs.\d{8})\/</g );
if ( not @dirs ) {
warn "!! No directories found via $url\n";
}
Expand Down

0 comments on commit 660d147

Please sign in to comment.