Forum: Ruby on Rails SimpleRss: Poorly formatted feed

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
softwareengineer 99 (Guest)
on 2006-02-01 10:03
(Received via mailing list)
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
softwareengineer 99 (Guest)
on 2006-02-01 10:21
(Received via mailing list)
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 <removed_email_address@domain.invalid> 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
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
softwareengineer 99 (Guest)
on 2006-02-01 11:52
(Received via mailing list)
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 <removed_email_address@domain.invalid> 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 <removed_email_address@domain.invalid> 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
removed_email_address@domain.invalid
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
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
Alex Y. (Guest)
on 2006-02-01 14:49
(Received via mailing list)
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 topic is locked and can not be replied to.