scrape v3.1.0 Scrape.IR.FeedItem
Similar (and used by) Scrape.IR.Feed
, but has specialized selectors
to extract data from feed items/entries.
Link to this section Summary
Functions
Extract the article_url from the feed item.
Extract the author from the feed item.
Extract the (best) description from the feed item.
Extract the image_url from the feed item.
Extract the possible tags from the feed item.
Extract the (best) title from the feed item.
Link to this section Functions
Link to this function
article_url(tree, url \\ "")
Extract the article_url from the feed item.
Example
iex> FeedItem.article_url("<link href='http://example.com' />")
"http://example.com"
iex> FeedItem.article_url("<link href='/url' />", "http://example.com")
"http://example.com/url"
Link to this function
author(tree)
Extract the author from the feed item.
Example
iex> FeedItem.author("<author>abc</author>")
"abc"
Link to this function
description(tree)
Extract the (best) description from the feed item.
Example
iex> FeedItem.description("<description>abc</description>")
"abc"
Link to this function
image_url(tree, url \\ "")
Extract the image_url from the feed item.
Example
iex> FeedItem.image_url("<enclosure url='abc' />")
"abc"
Link to this function
tags(tree)
Extract the possible tags from the feed item.
Example
iex> FeedItem.tags("<category>abc</category>")
["abc"]
iex> FeedItem.tags("<feed></feed>")
[]
Link to this function
title(tree)
Extract the (best) title from the feed item.
Example
iex> FeedItem.title("<title>abc</title>")
"abc"