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