CodeHollow.FeedReader
2.1.1
dotnet add package CodeHollow.FeedReader --version 2.1.1
NuGet\Install-Package CodeHollow.FeedReader -Version 2.1.1
<PackageReference Include="CodeHollow.FeedReader" Version="2.1.1" />
<PackageVersion Include="CodeHollow.FeedReader" Version="2.1.1" />
<PackageReference Include="CodeHollow.FeedReader" />
paket add CodeHollow.FeedReader --version 2.1.1
#r "nuget: CodeHollow.FeedReader, 2.1.1"
#:package CodeHollow.FeedReader@2.1.1
#addin nuget:?package=CodeHollow.FeedReader&version=2.1.1
#tool nuget:?package=CodeHollow.FeedReader&version=2.1.1
FeedReader
FeedReader is a .net library used for reading and parsing RSS, ATOM and JSON feeds. Supports RSS 0.91, 0.92, 1.0, 2.0, ATOM (1.0 and 0.3) and JSON Feed (1.0 and 1.1), plus the iTunes and Podcasting 2.0 (podcast:) podcast extensions.
Developed because tested existing libraries do not work with different languages, encodings or have other issues.
Library tested with multiple languages, encodings and feeds.
FeedReader library is available as NuGet package: https://www.nuget.org/packages/CodeHollow.FeedReader/
Usage
The simplest way to read a feed and show the information is:
var feed = await FeedReader.ReadAsync("https://arminreiter.com/feed");
Console.WriteLine("Feed Title: " + feed.Title);
Console.WriteLine("Feed Description: " + feed.Description);
Console.WriteLine("Feed Image: " + feed.ImageUrl);
// ...
foreach(var item in feed.Items)
{
Console.WriteLine(item.Title + " - " + item.Link);
}
There are some properties that are only available in e.g. RSS 2.0. If you want to get those properties, the property "SpecificFeed" is the right one:
var feed = await FeedReader.ReadAsync("https://arminreiter.com/feed");
Console.WriteLine("Feed Title: " + feed.Title);
if(feed.Type == FeedType.Rss_2_0)
{
var rss20feed = (Feeds.Rss20Feed)feed.SpecificFeed;
Console.WriteLine("Generator: " + rss20feed.Generator);
}
Podcast feeds: the iTunes and Podcasting 2.0 tags are available via extension methods:
using CodeHollow.FeedReader.Feeds.Itunes;
using CodeHollow.FeedReader.Feeds.Podcast;
var feed = await FeedReader.ReadAsync("https://feeds.podcastindex.org/pc20.xml");
var podcast = feed.GetPodcastChannel(); // podcast:guid, locked, funding, person, ...
Console.WriteLine("Guid: " + podcast.Guid);
foreach (var item in feed.Items)
{
var episode = item.GetPodcastItem(); // podcast:transcript, chapters, season, episode, ...
Console.WriteLine(item.Title + " - transcripts: " + episode.Transcripts.Length);
}
If the url to the feed is not known, then you can use FeedReader.GetFeedUrlsFromUrl(url) to parse the url from the html webpage:
string url = "arminreiter.com";
var urls = FeedReader.GetFeedUrlsFromUrl(url);
string feedUrl;
if (urls.Count() < 1) // no url - probably the url is already the right feed url
feedUrl = url;
else if (urls.Count() == 1)
feedUrl = urls.First().Url;
else if (urls.Count() == 2) // if 2 urls, then its usually a feed and a comments feed, so take the first per default
feedUrl = urls.First().Url;
else
{
// show all urls and let the user select (or take the first or ...)
// ...
}
var readerTask = FeedReader.ReadAsync(feedUrl);
readerTask.ConfigureAwait(false);
foreach (var item in readerTask.Result.Items)
{
Console.WriteLine(item.Title + " - " + item.Link);
// ...
}
The code contains a sample console application: https://github.com/codehollow/FeedReader/tree/master/FeedReader.ConsoleSample
Build & Test
dotnet test FeedReader.Tests
The library is strong-name signed with key.snk (SHA1). Distros that block SHA1 signatures (e.g. Fedora/RHEL) fail the signed build with invalid digest. To build the signed NuGet package on Linux (output: artifacts/):
build/pack.sh
Specifications
- RSS 0.91: http://www.rssboard.org/rss-0-9-1-netscape
- RSS 0.92: http://backend.userland.com/rss092, http://www.rssboard.org/rss-0-9-2
- RSS 1.0 : http://web.resource.org/rss/1.0/spec
- RSS 2.0 : https://validator.w3.org/feed/docs/rss2.html
- ATOM : https://validator.w3.org/feed/docs/atom.html
- JSON Feed: https://jsonfeed.org/version/1.1
- Podcasting 2.0 namespace: https://podcastindex.org/namespace/1.0
Release
dotnet test FeedReader.Tests # workflow doesn't run tests
build/release.sh 2.1.0 # needs clean working tree
Bumps <Version> in the csproj, commits, tags v2.1.0 and pushes. The tag push runs .github/workflows/release.yml: pack → nuget.org (Trusted Publishing, repo secret NUGET_USER) → GitHub release with the .nupkg attached.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- No dependencies.
-
.NETStandard 2.0
- System.Text.Encoding.CodePages (>= 8.0.0)
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on CodeHollow.FeedReader:
| Package | Downloads |
|---|---|
|
Wikiled.News.Monitoring
News Monitoring base library |
|
|
Destinet.SyncProvider.RSS
Package Description |
|
|
Wikiled.Delfi
Delfi parsing library |
|
|
SuperMemoAssistant.Plugins.Import
Package Description |
|
|
RssThrottle
Allows you to control the flow and timing of an RSS feed |
GitHub repositories (6)
Showing the top 6 popular GitHub repositories that depend on CodeHollow.FeedReader:
| Repository | Stars |
|---|---|
|
BedrockLauncher/BedrockLauncher
|
|
|
CervantesSec/cervantes
Cervantes is an open-source, collaborative platform designed specifically for pentesters and red teams. It serves as a comprehensive management tool, streamlining the organization of projects, clients, vulnerabilities, and reports in a single, centralized location.
|
|
|
Qolors/FeedCord
A dead simple RSS Feed with Discord Webhooks
|
|
|
ohhsodead/arisen-studio
Browse, Download and Install Mods for PlayStation 3 & Xbox 360
|
|
|
Strypper/mauisland
MAUIsland 🏝️ is the number 1 controls gallery for .NET MAUI
|
|
|
timkicker/podliner
Podcasts in any terminal. Fast, clean, offline.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.1 | 39 | 11/4/2026 |
| 2.1.0 | 37 | 11/4/2026 |
| 2.0.0 | 42 | 11/4/2026 |
| 1.2.7 | 44 | 11/4/2026 |
| 1.2.6 | 591,462 | 3/16/2023 |
| 1.2.4 | 117,447 | 1/14/2022 |
| 1.2.3 | 1,124 | 1/14/2022 |
| 1.2.2 | 43,195 | 8/19/2021 |
| 1.2.1 | 251,819 | 5/25/2019 |
| 1.2.0 | 1,372 | 5/25/2019 |
| 1.1.6 | 33,600 | 12/28/2018 |
| 1.1.5 | 15,835 | 9/19/2018 |
| 1.1.4 | 6,809 | 8/19/2018 |
| 1.1.2 | 17,965 | 4/15/2018 |
| 1.1.1.1 | 2,164 | 4/15/2018 |
| 1.1.1 | 3,674 | 3/3/2018 |
| 1.1.0.2 | 27,617 | 9/15/2017 |