On utilise désormais le flux RSS du type de publication « Podcast Libre à vous ! »
This commit is contained in:
parent
f958e5267b
commit
0921df8d2b
@ -25,8 +25,9 @@ use DateTime;
|
||||
use DateTime::Format::DateParse;
|
||||
|
||||
# Configuration variables
|
||||
my $url = "https://www.april.org/taxonomy_all_items/term/1917/all/feed";
|
||||
my $filename = "/usr/share/drupal6/lav.xml";
|
||||
my $url = "https://www.april.org/taxonomy_all_items/term/1918/all";
|
||||
my $urlfeed = "https://www.april.org/taxonomy_all_items/term/1918/all/feed";
|
||||
my $filename = "/usr/share/drupal6/lav3.xml";
|
||||
my $linkurl = "https://april.org/libre-a-vous";
|
||||
my $feedurl = "https://april.org/lav.xml";
|
||||
|
||||
@ -34,8 +35,8 @@ my $feedurl = "https://april.org/lav.xml";
|
||||
my $rss = XML::RSS->new;
|
||||
|
||||
# Fetch Drupal feed
|
||||
my $in_file = get($url);
|
||||
die "Couldn't get $url\n!" unless defined $in_file;
|
||||
my $in_file = get($urlfeed);
|
||||
die "Couldn't get $urlfeed\n!" unless defined $in_file;
|
||||
|
||||
# Parse RSS
|
||||
open(my $fh, '>:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!";
|
||||
@ -105,7 +106,8 @@ $rss->{items} = \@new_items;
|
||||
|
||||
# Output RSS
|
||||
my $rsscontent = $rss->as_string;
|
||||
$rsscontent =~s#https://www.april.org/taxonomy_all_items/term/1917/all#$feedurl#g;
|
||||
#$rsscontent =~s#https://www.april.org/taxonomy_all_items/term/1918/all#$feedurl#g;
|
||||
$rsscontent =~s#${url}#$feedurl#g;
|
||||
|
||||
print $fh $rsscontent;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user