LJ::ParseFeed::parse_feed

LJ::ParseFeed::parse_feed — Parses an RSS/Atom feed.

Use

LJ::ParseFeed::parse_feed(content, type);

Arguments

  • content. Feed content.

  • type. Optional; can be "atom" or "rss". If type isn't supplied, the function will try to guess it based on contents.

Info

items - An arrayref of item hashes, in the same order they were in the feed. Each item contains: link - URL of the item; id - unique identifier (optional); text - text of the item; subject - subject; time - in format 'yyyy-mm-dd hh:mm' (optional).

Source:

cgi-bin/parsefeed.pl

Returns:

Three arguments: $feed, $error, arrayref of items. $feed, which is a hash with the following keys: type - 'atom' or 'rss'; version - version of the feed in its standard; link - URL of the feed; title - title of the feed; description - description of the feed. The second argument returned is $error, which, if defined, is a human-readable error string. The third argument is an arrayref of items, same as $feed->{'items'}.