diff options
author | Christian Pointner <equinox@helsinki.at> | 2017-09-09 11:32:39 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2017-09-09 11:32:39 (GMT) |
commit | ccdd2812ced09b55d5c16a6931f8365b4fc252d4 (patch) | |
tree | a46d6fac243328b173489ce6ddb2ffb5ccfd790f /rhautoimport-gd | |
parent | 8173833310ea8f50f2b4f61b30b28cd69e9474cc (diff) |
some improvments and cleanup
Diffstat (limited to 'rhautoimport-gd')
-rwxr-xr-x | rhautoimport-gd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rhautoimport-gd b/rhautoimport-gd index 0fef8d2..d025025 100755 --- a/rhautoimport-gd +++ b/rhautoimport-gd @@ -88,7 +88,9 @@ print "day of Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_dat print "day of Radio Helsinki rebroadcast: " . Date::Calc::Date_to_Text(@import_date_reb) . "\n"; my $bd = sprintf("%04d-%02d-%02d", @broadcast_day); -print "looking for files from $bd in RSS Feed\n"; +my $bdfile = sprintf("^%4d%02d%02d", @broadcast_day); + +print "looking for files like '$bdfile' in RSS Feed\n"; print " -> $RSS_URL\n"; my ($result, $feed) = rhautoimport::fetch_parse_rss_cba($RSS_URL); @@ -97,8 +99,6 @@ unless ($result) { exit 1; } -my $bdexp = sprintf("^%4d%02d%02d", @broadcast_day); - my $uri = ""; my $file = ""; my $sum_title = ""; @@ -121,7 +121,7 @@ for my $entry ($feed->entries) { $uri = new URI::URL($orig_uri); my @path = $uri->path_components; $file = $path[-1]; - unless($file =~ /$bdexp/) { + unless($file =~ /$bdfile/) { $uri = ""; next; } |