I'm having a problem with Yahoo Finance RSS feeds.
My problem is that the date is not being parsed correctly from the article.
I have the "Retrieve From Feed" checked on in the settings and am using the "FeedAPI Node" processor. I use the built in Parser Common Syndication because I have a lot of feeds and the SimplePie parser has memory issues with the amount of feeds I am parsing.
I can't find any information that helps me solve this problem.
Comments
Comment #1
aron novakSee this:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Ffinance.yahoo.com%2F...
The pubDate is invalid in this feed.
Comment #2
Cactii1 commentedMmmm... I see.
So I guess the question is: "Is there any way to fix this?"
Comment #3
Cactii1 commentedIn the parser_common_syndication.module in the function _parser_common_syndication_RSS20_parse
Add this hack here...
Comment #4
gsnedders commentedFor compat. for both HTTP and RSS, when parsing RFC 822 dates, you have to treat "zone" as optional and ignore any trailing garbage.
Comment #5
don@robertson.net.nz commentedI am having a similar problem with a feed from Moodle. The feed items pubdate passes the feed validator mentioned above (the feed fails some other things though).
Can the feed validator handle the GMT timezone or should I use something similar to the above?
The feed url:
http://moodle.org/rss/file.php/1/1/forum/1/rss.xml
Validator results:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fmoodle.org%2Frss%2Ff...
Comment #6
aron novakI tried out that moodle feed with Common Syndication Parser and the date parsers fine.
Before you evaluate the result what you see, please be aware of the following:
You can configure Drupal timezone setting and it affects the date what you'll see.
Comment #7
Cactii1 commentedI've only ever found the problem with Yahoo! feeds. They don't specify their date correctly and the sysytem does not like that.
The date in the above Moodle feed looks fine.
Comment #8
don@robertson.net.nz commentedOkay - so it is not the 'GMT' bit.
Everything from the feed is dated with the refresh time - regardless of the date in the feeds, which is often days ago. I've checked my timezones etc and it seems to be okay.
I am using the feedapi_feedmapper module. Should I be setting the options->timestamp: to 'Map to created (node)'?
I am getting the same thing on some other feeds as well - but other feeds - even from the same site - work fine.
Any suggestions would be appreciated. I am going to copy the site to another machine and try it, then turn off modules/themes to see if I find anything.
don
Comment #9
don@robertson.net.nz commentedMoodle Feed: I deleted all the feed items, set the feedapi node to 'Use time of download' and saved, then set it to 'Retrieve from feed' and saved, refreshed and it gets the correct time. WTF?
I have three other feeds, all from the same site, that are giving me problems. I think they must be created by hand, because they are not consistant. Sometimes a feed will use:
which is not valid, and other times it will use
which is - at least according to feedvalidator.org.
But it does give me some inconsistant results. A couple of examples:
http://www.educationcounts.govt.nz/__data/assets/file/0014/29003/statist...
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.educationcounts....
Gives me this in the feedapi-mapper Feed item example box:
The timestamp from this is:
And the output on the page:
i.e, three different times for the item.
Example 2:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.educationcounts....
http://www.educationcounts.govt.nz/__data/assets/file/0007/24388/publica...
NOTE: I am at UTC +12, so the timestamp does at least almost match the node creation time. the timestamp cahnges every time I view the 'Map' page.
Anyway - probably caused by the feed. I'll email the site, and see if they can fix the feeds, but otherwise I leave it in your capable hands.
Comment #10
aron novak"Moodle Feed: I deleted all the feed items, set the feedapi node to 'Use time of download' and saved, then set it to 'Retrieve from feed' and saved, refreshed and it gets the correct time. WTF?"
It seems you simply misconfigured the module.
"Created date of item nodes" - i think this is clear enough. If it's not, please recommend a text for this settings to make it obvious for the users.
Comment #11
Cactii1 commentedYes... Welcome to the world of feed parsing magic. Very black box, fiddle through, oh help me jeeses kind of stuff.
The problem with feeds is that we're relying on the quality of other people's work.
Comment #12
socialnicheguru commentedOk this is the WEIRDEST thing!
#10 I am right there with you.
I have spent a few weeks coming back to this issue during development.
did what you suggested and voila... who the f*******K knew! OMG. I love Drupal but sometimes....
Chris
Comment #13
aron novakOk, i make this fixed then.
Comment #14
socialnicheguru commentedI don't know if this is a fix vs. a work around.
Maybe someone can put this on the readme and project page so people know what to do if this happens to them. How about reviewed and tested by community?