ElixirRss is a simple feed parser originally meant to parse the feed from crypto news. The existing Feed parser in elixir is either unnecessarily fast (rust dependant), or doesn't parse image information from RSS.
If available in Hex, the package can be installed
by adding elixir_rss
to your list of dependencies in mix.exs
:
def deps do
[
{:elixir_rss, "~> 0.1.0"}
]
end
> {:ok, feed} = ElixirRss.fetch_and_parse "https://cointelegraph.com/rss"
...
> {:ok, feed} = ElixirRss.parse "<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" ..."
...
> feed.title
"Cointelegraph.com News"
> feed.entries |> Enum.map(&(&1.title))
["Kazakhstan among top 3 Bitcoin mining destinations after US and China", "3Commas issues security alert as FTX deletes API keys following hack", ...]
id
feed identifier (usually the site url)title
feed titledescription
feed descriptionurl
feed urlsite_url
feed main site urlupdated
feed last modification timestampentries
entry list
id
unique identifier (SHA256)title
entry titleurl
entry permalinkcontent
entry contentimage
url of the thumbnail imageupdated
entry publication or modification timestamp
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elixir_rss.