Skip Menu |

This queue is for tickets about the RSS-Parser-Lite CPAN distribution.

Report information
The Basics
Id: 6090
Status: resolved
Priority: 0/
Queue: RSS-Parser-Lite

People
Owner: TFPBL [...] cpan.org
Requestors: roy [...] rant-central.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.12_01



Subject: Doesn't handle RSS 1.0 feeds - patch included
XML::RSS::Parser::Lite doesn't recognize RSS 1.0 feeds because they use a different XML namespace. The attached patch adds RSS 1.0 support. Merging this patch would be appreciated, as I have a project that depends on it. I really want to distribute against CPAN instead of bundling an unofficial fix. Thanks in advance!
--- /usr/lib/perl5/site_perl/5.8.0/XML/RSS/Parser/Lite.pm 2004-01-12 05:17:24.000000000 -0500 +++ Lite.pm 2004-01-12 05:19:51.000000000 -0500 @@ -2,7 +2,7 @@ use strict; -our $VERSION = '0.10'; +our $VERSION = '0.11'; sub new { my $class = shift; @@ -88,6 +88,7 @@ $self->{place} .= "/$tag"; $self->{latest} = $self->add if ($self->{place} eq '/rss/channel/item'); + $self->{latest} = $self->add if ($self->{place} eq '/rdf:RDF/item'); } sub char { @@ -97,6 +98,9 @@ $self->{latest}->set('title', $text) if ($self->{place} eq '/rss/channel/item/title'); $self->{latest}->set('url', $text) if ($self->{place} eq '/rss/channel/item/link'); $self->{latest}->set('description', $text) if ($self->{place} eq '/rss/channel/item/description'); + $self->{latest}->set('title', $text) if ($self->{place} eq '/rdf:RDF/item/title'); + $self->{latest}->set('url', $text) if ($self->{place} eq '/rdf:RDF/item/link'); + $self->{latest}->set('description', $text) if ($self->{place} eq '/rdf:RDF/item/description'); $self->{title} = $text if ($self->{place} eq '/rss/channel/title'); $self->{url} = $text if ($self->{place} eq '/rss/channel/link'); @@ -110,6 +114,9 @@ my $place = $self->{place}; $place = substr($place, 0, length($place)-length($tag)-1); # regex here causes segmentation fault! $self->{place} = $place; + $self->{title} = $text if ($self->{place} eq '/rdf:RDF/channel/title'); + $self->{url} = $text if ($self->{place} eq '/rdf:RDF/channel/link'); + $self->{description} = $text if ($self->{place} eq '/rdf:RDF/channel/description'); }
Thank you for reporting that problem, I've added support for optional and custom fields in version 0.12 Thomas
On Tue Oct 01 10:10:15 2013, TFPBL wrote: Show quoted text
> > Thank you for reporting that problem, I've added support for optional > and custom fields in version 0.12 > > Thomas
Sorry, the comment is not for this ticket, I've updated the handling of the RSSv1 and v2. Thomas