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;
|
use DateTime::Format::DateParse;
|
||||||
|
|
||||||
# Configuration variables
|
# Configuration variables
|
||||||
my $url = "https://www.april.org/taxonomy_all_items/term/1917/all/feed";
|
my $url = "https://www.april.org/taxonomy_all_items/term/1918/all";
|
||||||
my $filename = "/usr/share/drupal6/lav.xml";
|
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 $linkurl = "https://april.org/libre-a-vous";
|
||||||
my $feedurl = "https://april.org/lav.xml";
|
my $feedurl = "https://april.org/lav.xml";
|
||||||
|
|
||||||
@ -34,8 +35,8 @@ my $feedurl = "https://april.org/lav.xml";
|
|||||||
my $rss = XML::RSS->new;
|
my $rss = XML::RSS->new;
|
||||||
|
|
||||||
# Fetch Drupal feed
|
# Fetch Drupal feed
|
||||||
my $in_file = get($url);
|
my $in_file = get($urlfeed);
|
||||||
die "Couldn't get $url\n!" unless defined $in_file;
|
die "Couldn't get $urlfeed\n!" unless defined $in_file;
|
||||||
|
|
||||||
# Parse RSS
|
# Parse RSS
|
||||||
open(my $fh, '>:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!";
|
open(my $fh, '>:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!";
|
||||||
@ -105,7 +106,8 @@ $rss->{items} = \@new_items;
|
|||||||
|
|
||||||
# Output RSS
|
# Output RSS
|
||||||
my $rsscontent = $rss->as_string;
|
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;
|
print $fh $rsscontent;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user