.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Feed::Find 3pm" .TH Feed::Find 3pm "2022-10-30" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Feed::Find \- Syndication feed auto\-discovery .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Feed::Find; \& my @feeds = Feed::Find\->find(\*(Aqhttp://example.com/\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fIFeed::Find\fR implements feed auto-discovery for finding syndication feeds, given a \s-1URI.\s0 It (currently) passes all of the auto-discovery tests at \&\fIhttp://diveintomark.org/tests/client/autodiscovery/\fR. .PP \&\fIFeed::Find\fR will discover the following feed formats: .IP "\(bu" 4 \&\s-1RSS 0.91\s0 .IP "\(bu" 4 \&\s-1RSS 1.0\s0 .IP "\(bu" 4 \&\s-1RSS 2.0\s0 .IP "\(bu" 4 Atom .SH "USAGE" .IX Header "USAGE" .SS "Feed::Find\->find($uri)" .IX Subsection "Feed::Find->find($uri)" Given a \s-1URI\s0 \fI\f(CI$uri\fI\fR, use a variety of techniques to find the feeds associated with that page. If \fI\f(CI$uri\fI\fR itself points to a feed (i.e., if the \&\fIContent-Type\fR of the response is a recognized feed type), returns \fI\f(CI$uri\fI\fR. .PP Returns a list of feed URIs. .PP The following techniques are used: .IP "1. \fI\fR tag auto-discovery" 4 .IX Item "1. tag auto-discovery" If the page contains any \fI\fR tags in the \fI\fR section, these tags are examined for recognized feed content types. The following content types are treated as feeds: \fIapplication/x.atom+xml\fR, \&\fIapplication/atom+xml\fR, \fIapplication/xml\fR, \fItext/xml\fR, \&\fIapplication/rss+xml\fR, and \fIapplication/rdf+xml\fR. .IP "2. Scanning \fI\fR tags" 4 .IX Item "2. Scanning tags" If the page does not contain any known \fI\fR tags, the page is then scanned for \fI\fR tags for links to URIs with certain file extensions. The following extensions are treated as feeds: \fI.rss\fR, \fI.xml\fR, and \fI.rdf\fR. .Sp Note that this technique is employed \fBonly\fR if the first technique returns no results. .ie n .SS "Feed::Find\->find_in_html(\e$html [, $base_uri ])" .el .SS "Feed::Find\->find_in_html(\e$html [, \f(CW$base_uri\fP ])" .IX Subsection "Feed::Find->find_in_html($html [, $base_uri ])" Given a reference to a string \fI\f(CI$html\fI\fR containing an \s-1HTML\s0 page, uses the same techniques as described above in \fIfind\fR to find the feeds associated with that page. .PP If you know the \s-1URI\s0 of the page, you should provide it in \fI\f(CI$base_uri\fI\fR, so that relative links can be properly made absolute. \fIFeed::Find\fR will attempt to determine the correct base \s-1URI,\s0 but unless that \s-1URI\s0 is specified in the \&\s-1HTML\s0 itself (in a \f(CW\*(C`\*(C'\fR tag), you'll need to supply it yourself. .PP Returns a list of feed URIs. .SH "LICENSE" .IX Header "LICENSE" \&\fIFeed::Find\fR is free software; you may redistribute it and/or modify it under the same terms as Perl itself. .SH "AUTHOR & COPYRIGHT" .IX Header "AUTHOR & COPYRIGHT" Except where otherwise noted, \fIFeed::Find\fR is Copyright 2004 Benjamin Trott, ben+cpan@stupidfool.org. All rights reserved.