diff options
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; } |