SimpleRss: Poorly formatted feed

Based on the suggestions here I decided to use SimpleRSS but no matter
what RSS feed I try, I keep getting the error:

“Poorly formatted feed”

I have tried “well formatted” RSS 0.91, 0.92 and 2.0 feeds but to no
avail.

Can anyone please come to my rescue?

Thanks
Frank

I found the code (but not the reason) why I am getting the error:

The code is:

        raise  SimpleRSSError, "Poorly formatted feed" unless 

@source =~ %r{<(channel|feed).?>.?</(channel|feed)>}mi

However, I have even tried the example slashdot.rdf but to no avail?

Any assistance is appreciated.

Frank

softwareengineer 99 [email protected] wrote: Based on the
suggestions here I decided to use SimpleRSS but no matter what RSS feed
I try, I keep getting the error:

“Poorly formatted feed”

I have tried “well formatted” RSS 0.91, 0.92 and 2.0 feeds but to no
avail.

Can anyone please come to my rescue?

Thanks
Frank


Do you Yahoo!?
With a free 1 GB, there’s more in store with Yahoo!
Mail._______________________________________________
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Hello,

This is my code so far:

begin
@feeds = @category.feeds
for @feed in @feeds
rss = SimpleRSS.parse(@feed.url, true)
# … formatting code
end
rescue Exception => exc
flash[:notice] = “R: #{exc.message}”
end

Any suggestions / ideas are greatly appreciated.

Thanks
Frank

softwareengineer 99 [email protected] wrote: I found the
code (but not the reason) why I am getting the error:

The code is:

        raise  SimpleRSSError, "Poorly formatted feed" unless 

@source =~ %r{<(channel|feed).?>.?</(channel|feed)>}mi

However, I have even tried the example slashdot.rdf but to no avail?

Any assistance is appreciated.

Frank

softwareengineer 99 [email protected] wrote: Based on the
suggestions here I decided to use SimpleRSS but no matter what RSS feed
I try, I keep getting the error:

“Poorly formatted feed”

I have tried “well formatted” RSS 0.91, 0.92 and 2.0 feeds but to no
avail.

Can anyone please come to my rescue?

Thanks
Frank


Do you Yahoo!?
With a free 1 GB, there’s more in store with Yahoo!
Mail._______________________________________________
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more
on new and used cars._______________________________________________
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

softwareengineer 99 wrote:

Hello,

This is my code so far:

begin
@feeds = @category.feeds
for @feed in @feeds
rss = SimpleRSS.parse(@feed.url, true)
You’re trying to parse the url, not the feed. My code to do something
similar looks like:

rss = SimpleRSS.parse(rio(@feed.url).read, true)

because the rio library is too groovy not to use like that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs