Fix for issue #5 - RSS 'item' is a hash instead of a list
This commit is contained in:
+6
-1
@@ -377,8 +377,13 @@ sub decode_feed{
|
||||
my @list = ();
|
||||
|
||||
# RSS
|
||||
if( defined $feed->{'channel'} and defined $feed->{'channel'}->{'item'} and ref $feed->{'channel'}->{'item'} eq 'ARRAY' ){
|
||||
if( defined $feed->{'channel'} and defined $feed->{'channel'}->{'item'} ){
|
||||
if( ref $feed->{'channel'}->{'item'} eq 'ARRAY' ){
|
||||
@list = @{$feed->{'channel'}->{'item'}};
|
||||
}
|
||||
elsif( ref $feed->{'channel'}->{'item'} eq 'HASH' ){
|
||||
@list = values %{$feed->{'channel'}->{'item'}};
|
||||
}
|
||||
}
|
||||
# Atom
|
||||
elsif( defined $feed->{'entry'} and ref $feed->{'entry'} eq 'HASH' ){
|
||||
|
||||
Reference in New Issue
Block a user