davorg-cpan / xml-feed

The CPAN module XML::Feed
18 stars 22 forks source link

Parsing Errors [rt.cpan.org #76738] #46

Closed atoomic closed 5 years ago

atoomic commented 5 years ago

Migrated from rt.cpan.org#76738 (status was 'open')

Requestors:

From halkeye@cpan.org on 2012-04-21 07:02:08 :

http://feeds.news.aol.com/synfeeds/artsynop/2604/rss.xml - 

Can't use string ("<a name="836437"></a><div class=") as a HASH ref while "strict refs" in 
use at /usr/lib/perl5/site_perl/5.8.8/XML/Feed/Entry/Format/RSS.pm line 60.

Looking at the code, $item->{content} should be a hash, but its not:
i$VAR1 = {
          'isPermaLink' => '',
          'link' => 'http://www.sphere.com/nation/article/attack-calls-into-question-the-
practice-of-using-afghans-to-guard-us-bases/19299603',
          'dc' => {
                    'date' => '2010-01-01T17:33:34Z'
                  },
          'content' => '<a name="836437"></a><div class="hentry a836437" reltag="National 
News">    <div class="synpTtlArt"><img 
src="http://www.aolcdn.com/aolnews/sphereeyebrow" alt="Sphere" title="Sphere" /></div>
    <h3 class="entry-title TtlArt"><a rel="bookmark" 
href="http://www.sphere.com/nation/article/attack-calls-into-question-the-practice-of-
using-afghans-to-guard-us-bases/19299603">Should Afghans Guard US Bases?</a></h3>    
<h4 class="byline">        <span class="posted"><abbr class="synpAbbr" title="2010-01-
01T12:33:34Z">posted:<span class="bylinDt"> 840 DAYS 13 HOURS AGO</span></abbr>
</span></h4>    <h4 class="byline">        <span class="filedUnder">filed under: <a 
href="http://news.aol.com/nation">National News</a>, <a 
href="http://news.aol.com/world">World News</a></span></h4>    <div class="entry-
summary"><!-- Enhancement List size = 0 -->
<div class="synpTxt">In the wake of a suicide attack that left seven CIA employees dead in 
Khost province, questions surround the use of Afghan forces to guard U.S. bases in the 
volatile country.</div>    <div class="entry-permalink"> <a rel="bookmark" 
href="http://www.sphere.com/nation/article/attack-calls-into-question-the-practice-of-
using-afghans-to-guard-us-bases/19299603">Full Coverage</a></div>    </div><div 
class="synpShrHide"></div></div>',
          'item' => '

    ',
          'description' => 'In the wake of a suicide attack that left seven CIA employees dead in 
Khost province, questions surround the use of Afghan forces to guard U.S. bases in the 
volatile country.',
          'http://purl.org/dc/elements/1.1/' => {
                                                'date' => '2010-01-01T17:33:34Z'
                                              },
          'title' => 'Should Afghans Guard US Bases?',
          'category' => [
                        'National News',
                        'World News'
                      ],
          'guid' => '836437',
          'pubDate' => 'Fri, 01 Jan 2010 17:33:34 GMT'
        };

From ether@cpan.org on 2012-04-21 15:54:13 :

On Sat Apr 21 00:02:08 2012, HALKEYE wrote:
> Looking at the code, $item->{content} should be a hash, but its not:

Thanks for the report!

In order to aid diagnosis, can you provide a short, self-contained code
snippet which demonstrates this issue?

From davecross@cpan.org on 2012-04-21 16:09:01 :

It looks like that RSS feed isn't valid:

http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffeeds.news.aol.com%2Fsynfeeds%2Fartsynop%2F2604%2Frss.xml

But I don't think those errors should lead to the errors that you're seeing.

Investigating further.

Cheers,

Dave...
atoomic commented 5 years ago

it appears that this was fixed by #35 need confirmation and if so let's close this ticket cc: @davorg

atoomic commented 5 years ago

this ticket is so old that we cannot access the URL anymore All the more it appears that a fix was already submitted, I'm encline to close this ticket. If someone has one issue parsing one feed, a new case should be opened