updated blank with changes from smhn

This commit is contained in:
Jacob Haddon 2024-03-17 19:18:04 -04:00
parent e8b01b292c
commit 5e393fd674

View File

@ -21,6 +21,7 @@ use warnings;
# Packages
use Time::Piece; # https://perldoc.perl.org/Time::Piece
use Time::Seconds; # https://perldoc.perl.org/Time::Seconds
use LWP::Simple; # https://metacpan.org/pod/LWP::Simple
use XML::RSS; # https://metacpan.org/pod/XML::RSS
use HTML::Entities; # https://metacpan.org/pod/HTML::Entities
@ -52,9 +53,12 @@ my $copyright = 'Copyright respective writers';
# add to new RSS feed object
###################################
# number of weeks in the past to hold RSS feed
my $num_weeks = 2;
# get today, subtact time to make cut off
my $now = localtime;
my $then = $now->add_months(-2);
my $then = $now - (ONE_WEEK * $num_weeks);
#number of items to keep from each feed
my $number_of_items = 2; # +1 since everything starts at 0
@ -146,7 +150,7 @@ while ( my $url = <DATA>) {
} # while DATA
#close out the list URL html
$listHTML .= "</div></ul>\n";
$listHTML .= "</ul></div>\n";
###################################
# Write the error file
@ -185,7 +189,7 @@ foreach my $name (reverse sort keys %list) {
link => $list{$name}->{'link'},
description => $list{$name}->{'description'},
pubDate => $list{$name}->{'pubDate'},
author => $list{$name}->{'dc'}{'creator'},
author => $list{$name}->{'itemAuthor'},
source => $list{$name}->{'feedName'},
sourceUrl => $list{$name}->{'feedURL'},
); # $rss->channel