1NAME 2 Feed::Find - Syndication feed auto-discovery 3 4SYNOPSIS 5 use Feed::Find; 6 my @feeds = Feed::Find->find('http://example.com/'); 7 8DESCRIPTION 9 *Feed::Find* implements feed auto-discovery for finding syndication 10 feeds, given a URI. It (currently) passes all of the auto-discovery 11 tests at *http://diveintomark.org/tests/client/autodiscovery/*. 12 13 *Feed::Find* will discover the following feed formats: 14 15 * RSS 0.91 16 17 * RSS 1.0 18 19 * RSS 2.0 20 21 * Atom 22 23USAGE 24 Feed::Find->find($uri) 25 Given a URI *$uri*, use a variety of techniques to find the feeds 26 associated with that page. If *$uri* itself points to a feed (i.e., if 27 the *Content-Type* of the response is a recognized feed type), returns 28 *$uri*. 29 30 Returns a list of feed URIs. 31 32 The following techniques are used: 33 34 1. *<link>* tag auto-discovery 35 If the page contains any *<link>* tags in the *<head>* section, 36 these tags are examined for recognized feed content types. The 37 following content types are treated as feeds: 38 *application/x.atom+xml*, *application/atom+xml*, *application/xml*, 39 *text/xml*, *application/rss+xml*, and *application/rdf+xml*. 40 41 2. Scanning *<a>* tags 42 If the page does not contain any known *<link>* tags, the page is 43 then scanned for *<a>* tags for links to URIs with certain file 44 extensions. The following extensions are treated as feeds: .rss, 45 .xml, and .rdf. 46 47 Note that this technique is employed only if the first technique 48 returns no results. 49 50 Feed::Find->find_in_html(\$html [, $base_uri ]) 51 Given a reference to a string *$html* containing an HTML page, uses the 52 same techniques as described above in *find* to find the feeds 53 associated with that page. 54 55 If you know the URI of the page, you should provide it in *$base_uri*, 56 so that relative links can be properly made absolute. *Feed::Find* will 57 attempt to determine the correct base URI, but unless that URI is 58 specified in the HTML itself (in a "<meta>" tag), you'll need to supply 59 it yourself. 60 61 Returns a list of feed URIs. 62 63LICENSE 64 *Feed::Find* is free software; you may redistribute it and/or modify it 65 under the same terms as Perl itself. 66 67AUTHOR & COPYRIGHT 68 Except where otherwise noted, *Feed::Find* is Copyright 2004 Benjamin 69 Trott, ben+cpan@stupidfool.org. All rights reserved. 70 71