aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Scheibenpflug <zorchenhimer@gmail.com>2015-05-08 05:07:50 (GMT)
committerNick Scheibenpflug <zorchenhimer@gmail.com>2015-05-08 05:07:50 (GMT)
commit3369aaa9068dd34e1d3bb19a854a1137ce69f812 (patch)
tree8523daba29d561e1029b190d0c6f12ff0eb38486
parent4c3586d5a1b0d6b4c306865f8586200282510090 (diff)
downloadslipshine-rss-3369aaa9068dd34e1d3bb19a854a1137ce69f812.zip
slipshine-rss-3369aaa9068dd34e1d3bb19a854a1137ce69f812.tar.gz
Added some missing info to the description of each item.
-rw-r--r--rss-fix_no-xml-rss.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/rss-fix_no-xml-rss.pl b/rss-fix_no-xml-rss.pl
index 2a73522..5deaa05 100644
--- a/rss-fix_no-xml-rss.pl
+++ b/rss-fix_no-xml-rss.pl
@@ -24,13 +24,17 @@ foreach my $item (@items) {
24 my @list_items = split /<li>/, $1; 24 my @list_items = split /<li>/, $1;
25 foreach my $l (@list_items) { 25 foreach my $l (@list_items) {
26 if ($l) { 26 if ($l) {
27 $l =~ m#<a href="(.*?)">(.*?)</a>#; 27 $l =~ m#<a href="(.*?)">(.*?)</a>(.*)#;
28 my $ul_link = $1; 28 my $ul_link = $1;
29 my $ul_title = $2; 29 my $ul_title = $2;
30 my $ul_title_b = $3;
31
32 $ul_title_b =~ s/<(.*?)>//g;
30 33
31 my %link_data; 34 my %link_data;
32 $link_data{'link'} = $ul_link; 35 $link_data{'link'} = $ul_link;
33 $link_data{'title'} = $ul_title; 36 $link_data{'title'} = $ul_title;
37 $link_data{'titleb'} = $ul_title_b;
34 $link_data{'pubDate'} = $sections{'pubDate'}; 38 $link_data{'pubDate'} = $sections{'pubDate'};
35 39
36 push @ul_links, \%link_data; 40 push @ul_links, \%link_data;
@@ -53,7 +57,7 @@ foreach my $nlink (@ul_links) {
53 print "\t\t<guid>$nlink->{link}</guid>\n"; 57 print "\t\t<guid>$nlink->{link}</guid>\n";
54 print "\t\t<link>$nlink->{link}</link>\n"; 58 print "\t\t<link>$nlink->{link}</link>\n";
55 print "\t\t<pubDate>$nlink->{pubDate}</pubDate>\n"; 59 print "\t\t<pubDate>$nlink->{pubDate}</pubDate>\n";
56 print "\t\t<description><![CDATA[<a href=\"$nlink->{link}\">$nlink->{title}</a>]]></description>\n"; 60 print "\t\t<description><![CDATA[<a href=\"$nlink->{link}\">$nlink->{title}</a>$nlink->{titleb}]]></description>\n";
57 print "\t</item>\n"; 61 print "\t</item>\n";
58} 62}
59print "</channel>\n</rss>\n"; 63print "</channel>\n</rss>\n";