0.4.4 • Published 5 months ago

feedhunter v0.4.4

Weekly downloads
-
License
GPLV2
Repository
github
Last release
5 months ago

feedHunter

A Node.js package that looks for a feed, starting with the address of an HTML file.

How to

const feedhunter = require ("feedhunter");
const htmlUrl = "http://bullmancuso.com";
feedhunter.huntForFeed (htmlUrl, undefined, function (feedUrl) {
	if (feedUrl === undefined) {
		console.log ("Couldn't find a feed for this page.");
		}
	else {
		console.log ("feedUrl == " + feedUrl);
		}
	});

Note: The second parameter to feedhunter.huntForFeed allows you to replace our set of standard feed locations with your own list.

What it does

When the user subscribes to an HTML file in FeedLand, first we look for all the <link> elements in the HTML that point to feeds. We look at each feed in turn, and if we find one that can be read and parses as a feed, we subscribe to that feed and display its Feed Info page. We do that with a call to feedhunter.huntForFeed.

We also use a set of common feed locations we found by studying the feed list of the indieblog site (a great resource for our work, thanks!), and by studying the feeds people have subscribed to on feedland.org.

I put this code in a separate package, because it seemed it might be useful in other contexts and people may have other ideas for standard feed locations we could add to the search.

Experiment in FeedLand

If you want to try an experiment, choose To one feed from the Subscribe sub-menu in FeedLand's main menu, and enter http://bullmancuso.com.

I put a copy of a very old feed in a weird location, one of the places feedhunter looks.

If it's working we'll find the feed anyway. :smile:

Questions, comments?

Create an issue here.

0.4.4

5 months ago

0.4.3

6 months ago

0.4.2

6 months ago

0.4.1

6 months ago

0.4.0

6 months ago