CodeHollow.FeedReader
1.2.6
dotnet add package CodeHollow.FeedReader --version 1.2.6
NuGet\Install-Package CodeHollow.FeedReader -Version 1.2.6
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.6" />
paket add CodeHollow.FeedReader --version 1.2.6
#r "nuget: CodeHollow.FeedReader, 1.2.6"
// Install CodeHollow.FeedReader as a Cake Addin #addin nuget:?package=CodeHollow.FeedReader&version=1.2.6 // Install CodeHollow.FeedReader as a Cake Tool #tool nuget:?package=CodeHollow.FeedReader&version=1.2.6
FeedReader
FeedReader is a .net library used for reading and parsing RSS and ATOM feeds. Supports RSS 0.91, 0.92, 1.0, 2.0 and ATOM. 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);
}
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
Specifications
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 was computed. 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. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. 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 | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
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 (4)
Showing the top 4 popular GitHub repositories that depend on CodeHollow.FeedReader:
Repository | Stars |
---|---|
BedrockLauncher/BedrockLauncher
|
|
Strypper/mauisland
MAUIsland 🏝️ is the number 1 controls gallery for .NET MAUI
|
|
ohhsodead/arisen-studio
Browse, Download and Install Mods for PlayStation 3 & Xbox 360
|
|
Qolors/FeedCord
A dead simple RSS Feed with Discord Webhooks
|
Version | Downloads | Last updated |
---|---|---|
1.2.6 | 193,486 | 3/16/2023 |
1.2.4 | 94,343 | 1/14/2022 |
1.2.3 | 632 | 1/14/2022 |
1.2.2 | 36,821 | 8/19/2021 |
1.2.1 | 234,123 | 5/25/2019 |
1.2.0 | 994 | 5/25/2019 |
1.1.6 | 31,878 | 12/28/2018 |
1.1.5 | 15,230 | 9/19/2018 |
1.1.4 | 3,650 | 8/19/2018 |
1.1.2 | 17,204 | 4/15/2018 |
1.1.1.1 | 1,526 | 4/15/2018 |
1.1.1 | 2,980 | 3/3/2018 |
1.1.0.2 | 24,898 | 9/15/2017 |
1.1.0.1 | 2,902 | 7/21/2017 |
1.1.0 | 3,039 | 6/1/2017 |
1.0.3.6 | 1,708 | 5/12/2017 |
1.0.3.5 | 1,359 | 5/8/2017 |
1.0.3.4 | 1,319 | 5/8/2017 |
1.0.3.3 | 1,330 | 4/4/2017 |
1.0.3.2 | 1,599 | 1/25/2017 |
1.0.3.1 | 1,464 | 1/25/2017 |
1.0.3 | 1,379 | 1/24/2017 |
1.0.2 | 1,479 | 1/23/2017 |
1.0.1 | 1,515 | 1/23/2017 |
1.0.0 | 1,391 | 1/23/2017 |
0.9.0 | 1,436 | 1/16/2017 |
fix issue