Crate feedfinder[][src]

Expand description


The feedfinder crate is for auto-discovering RSS, Atom, JSON feeds from the content of a page.

You supply the primary function detect_feeds with the content of a HTML page and the URL of that page and it returns a list of possible feeds.


feedfinder can find feeds from these sources:

  • Linked via the <link> tag in the HTML
  • Linked via <a> tag in the HTML
  • By guessing from the software used to generate the page:
    • Tumblr
    • WordPress
    • Hugo
    • Jekyll
    • Ghost
  • From YouTube:
    • channels
    • playlists
    • users

Getting Started

Add dependencies to Cargo.toml:

feedfinder = "0.1"


This example detects the feed linked via the <link> tag in the HTML.

use feedfinder::detect_feeds;
use url::Url;

fn main() {
    let url = Url::parse("").expect("unable to parse url");
    let html = r#"
                <link rel="alternate" href="/posts.rss" type="application/rss+xml" />
                My fun page with a feed.

    match detect_feeds(&url, html) {
        Ok(feeds) => {
            println!("Possible feeds for {}", url);
            for feed in feeds {
                println!("{:?}", feed);
        Err(err) => println!("Unable to find feeds due to error: {}", err),


A parsed URL record.



Find feeds in the supplied content.