PDA

View Full Version : RSS Feeds working?



jumbodogs
May 23rd, 2009, 07:27 AM
I setup some RSS Feeds in the component manager but only BBC which was already there seems to work. I entered in:

http://sports.espn.go.com/espn/rss/news

for publication date I get 10660 and for news items there is nothing.

I then went into NRD and brought up the variable manager and for BBC feed I can see computer name\RSS\BBC World News\Itemlist on the left side and the right side is a bunch of Titles and descriptions ( seems like everything is good)

for ESPN I just get computer name\RSS\ESPN Top Stories\ItemList.UnitsLong and XPS\RSS\ESPN Top Stories\ItemList.UnitsShort that is it there is no news titles or descriptions.

Rob H
May 23rd, 2009, 01:30 PM
What build of Girder is this?

I did do some work on the RSS component recently which should be in the latest build.

VicVonDoom
May 24th, 2009, 03:22 AM
I thought it was me doing something wrong (again!) until i saw this post.

I am also seeing \ItemList.UnitsLong and \ItemList.UnitsShort with a value of 0, No matter what RSS feed i put into girder (build 543)

This is how i did it (not sure if its right or not)
G5>Component manager>Miscellaneous>RSS Feeds>Add

Name = GBPExchangeRate
URL = http://themoneyconverter.com/GBP/rss.xml
Update Freq = 30

Girder variables give me this
RSS.Locations.List[1].Name = GBPExchangeRate
RSS.Locations.List[1].RefreshInterval = 30
RSS.Locations.List[1].URL = http://themoneyconverter.com/GBP/rss.xml

LUA error console is att below

NeRD variables give me this (see pics)

What do i need to use as my button/frame value?
As none of these variables give me the actual news feed - just titles.

Rob H
May 24th, 2009, 03:36 AM
Can you just check the file luascript\Classes\RSS.lua - and make sure that the Update method starts like this



Update = function (self)
local url = self.URL .. '?datestamp='.. (string.gsub(tostring(date:now()), "[./:]", ""))
local d,err = win.URLDownloadToMemory ( url)

Rob H
May 24th, 2009, 03:43 AM
Oh, and while you're at it you may find it more convenient to go into Tool|Preferences in NRD and add the following delimiters .\_ (dot, backslash, underscore)

VicVonDoom
May 24th, 2009, 03:51 AM
Can you just check the file luascript\Classes\RSS.lua - and make sure that the Update method starts like this



Update = function (self)
local url = self.URL .. '?datestamp='.. (string.gsub(tostring(date:now()), "[./:]", ""))
local d,err = win.URLDownloadToMemory ( url)

Identical.

Rob H
May 24th, 2009, 04:04 AM
This is what I see in the NR variable inspector for that feed.

VicVonDoom
May 24th, 2009, 04:22 AM
Hmmmmm. This is mine, no items :confused:

(should i be doing a require'something' in system lua?)

Rob H
May 24th, 2009, 04:33 AM
Only a require 'DMSupport' and a call to DM.Init() in your OnCCFLoad

VicVonDoom
May 24th, 2009, 04:42 AM
This weekends lesson is called "Patience".

The BBC updates every 10mins, my other feed was set to 30mins - I changed that to an impatient 5mins and now its all coming through.

Does girder not get the feed as soon as you've added it? Seems like it waits for the timeout? Anyhoo, its working now. :D

Much Obliged.
Impatient Jim

Rob H
May 24th, 2009, 04:57 AM
You know, I'm not sure - I thought it did though. It seemed to do that for me.

jumbodogs
May 25th, 2009, 06:02 AM
Just wanted to say that I updated to the latest build and everything is working great.

Thanks very much

Rob H
May 25th, 2009, 06:38 AM
Great, thanks for letting me know.

dsmes
June 30th, 2009, 02:08 AM
I did do some work on the RSS component recently which should be in the latest build.I thought I'd piggy back on this thread and report some error messages that are new in Girder v5.0.9(build 543). Note that a lot of RSS feeds are received correctly, I just thought this might help improve the feeds parsing.
Couldn't parse http://msnbcmedia.msn.com/i/msnbc/Components/ColorBoxes/Styles/ColorBoxImages_GlobalOnlyPlease/xmlIcon.gif not well-formed (invalid token)
Couldn't parse http://www.wired.com/news/feeds/rss2/0,2610,,00.xml mismatched tag
Couldn't parse http://hosted.ap.org/lineups/TECHHEADS-rss_2.0.xml?SITE=RANDOM&SECTION=HOME no element found
Couldn't parse http://www.wired.com/news/feeds/rss2/0,2610,,00.xml mismatched tag
Couldn't parse http://msnbcmedia.msn.com/i/msnbc/Components/ColorBoxes/Styles/ColorBoxImages_GlobalOnlyPlease/xmlIcon.gif not well-formed (invalid token)
Couldn't parse http://www.wired.com/news/feeds/rss2/0,2610,,00.xml mismatched tag
Couldn't parse http://hosted.ap.org/lineups/TECHHEADS-rss_2.0.xml?SITE=RANDOM&SECTION=HOME no element found

Rob H
June 30th, 2009, 04:04 AM
Thanks for those, I may change the RSS parsing to use the htmltidy dll which is a lot more forgiving of errors like this.