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 |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1 |
.NET Framework | net452 net46 net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen30 tizen40 tizen60 |
Universal Windows Platform | uap uap10.0 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETCoreApp 2.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on CodeHollow.FeedReader:
Package | Downloads |
---|---|
Wikiled.News.Monitoring
News Monitoring base library |
|
Wikiled.Delfi
Delfi parsing library |
|
SuperMemoAssistant.Plugins.Import
Package Description |
|
RssThrottle
Allows you to control the flow and timing of an RSS feed |
|
Drastic.Feed.Rss.FeedReader
Drastic.Feed.Rss.Feedreader is an implementation of Drastic.Feed.Rss using FeedReader. |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on CodeHollow.FeedReader:
Repository | Stars |
---|---|
BedrockLauncher/BedrockLauncher
|
|
Valkirie/HandheldCompanion
ControllerService
|
|
ohhsodead/arisen-studio
Browse, Download and Install Mods for PlayStation 3 & Xbox 360
|
Version | Downloads | Last updated |
---|---|---|
1.2.6 | 775 | 3/16/2023 |
1.2.4 | 59,127 | 1/14/2022 |
1.2.3 | 203 | 1/14/2022 |
1.2.2 | 28,038 | 8/19/2021 |
1.2.1 | 202,716 | 5/25/2019 |
1.2.0 | 556 | 5/25/2019 |
1.1.6 | 29,617 | 12/28/2018 |
1.1.5 | 12,799 | 9/19/2018 |
1.1.4 | 3,192 | 8/19/2018 |
1.1.2 | 16,588 | 4/15/2018 |
1.1.1.1 | 1,023 | 4/15/2018 |
1.1.1 | 2,503 | 3/3/2018 |
1.1.0.2 | 20,970 | 9/15/2017 |
1.1.0.1 | 2,460 | 7/21/2017 |
1.1.0 | 2,525 | 6/1/2017 |
1.0.3.6 | 1,185 | 5/12/2017 |
1.0.3.5 | 892 | 5/8/2017 |
1.0.3.4 | 862 | 5/8/2017 |
1.0.3.3 | 883 | 4/4/2017 |
1.0.3.2 | 1,123 | 1/25/2017 |
1.0.3.1 | 978 | 1/25/2017 |
1.0.3 | 895 | 1/24/2017 |
1.0.2 | 980 | 1/23/2017 |
1.0.1 | 1,025 | 1/23/2017 |
1.0.0 | 915 | 1/23/2017 |
0.9.0 | 917 | 1/16/2017 |
fix issue