From 0921df8d2b346842eb76ca22ccdc2ac4872642ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Couchet?= Date: Thu, 5 Dec 2019 16:46:43 +0100 Subject: [PATCH] =?UTF-8?q?On=20utilise=20d=C3=A9sormais=20le=20flux=20RSS?= =?UTF-8?q?=20du=20type=20de=20publication=20=C2=AB=20Podcast=20Libre=20?= =?UTF-8?q?=C3=A0=20vous=20!=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- podcasts/scripts/feed2lav.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/podcasts/scripts/feed2lav.pl b/podcasts/scripts/feed2lav.pl index b09a6cf..86618e3 100755 --- a/podcasts/scripts/feed2lav.pl +++ b/podcasts/scripts/feed2lav.pl @@ -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;