Skip to content
Ruby's favorite feed auto-discovery library/tool
Pull request Compare This branch is 1 commit ahead, 45 commits behind damog:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Do you want me to drag my sack across your face? - Glenn Quagmire

Feedbag is a feed auto-discovery Ruby library. You don't need to know more about it. It is said to be:

Ruby's favorite auto-discovery tool/library!

Quick synopsis

>> require "rubygems"
=> true
>> require "feedbag"
=> true
>> Feedbag.find ""
=> ["", ""]
>> Feedbag.feed?("")
=> false
>> Feedbag.feed?("")
=> true


$ sudo gem install damog-feedbag -s

Or just grab feedbag.rb and use it on your own project:

$ wget


So you want to know more about it.

OK, if the URL passed to the find method is a feed itself, that only feed URL will be returned.

>> Feedbag.find ""
=> [""]

Otherwise, it will always return LINK feeds first, A (anchor tags) feeds later. Between A feeds, the ones hosted on the same URL's host, will have larger priority:

>> Feedbag.find ""
=> ["", "", "", "", "", ""]

On your application you should only take the very first element of the array, most of the times:

>> Feedbag.find("").first(3)
=> ["", "", ""]

(Try running that same example without the "first" method. That example's host is a blog aggregator, so it has hundreds of feed URLs:)

>> Feedbag.find("").size
=> 104

Feedbag will find them all, but it will return the most important ones on the first elements on the array returned.

>> Feedbag.find("")
=> ["", "", ""]

Why should you use it?

  • Because it's cool.
  • Because it only uses Hpricot as dependency.
  • Because it follows modern feed filename conventions (like those ones used by WordPress blogs, or Blogger, etc).
  • Because it's a single file you can embed easily in your application.
  • Because it passes most of the Mark Pilgrim's Atom auto-discovery test suite. It doesn't pass them all because some of those tests are broken (citation needed).

Why did I build it?

  • Because I liked Benjamin Trott's Feed::Find.
  • Because I thought it would be good to have Feed::Find's functionality in Ruby.
  • Because I thought it was going to be easy to maintain.
  • Because I was going to use it on rFeed.
  • And finally, because I didn't know rfeedfinder existed :-)


Please, report bugs to or directly to the author.


git clone git://

...patch, build, hack and make pull requests. I'll be glad.


David Moreno <>.


This is free software. See COPYING for more information.


Raquel, for making Axiombox and most of my dreams possible. Also, GitHub for making a nice code sharing service that doesn't suck.

Something went wrong with that request. Please try again.