CodeHollow.FeedReader 1.2.6

dotnet add package CodeHollow.FeedReader --version 1.2.6
NuGet\Install-Package CodeHollow.FeedReader -Version 1.2.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodeHollow.FeedReader --version 1.2.6
#r "nuget: CodeHollow.FeedReader, 1.2.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETStandard 1.3

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 (2)

Showing the top 2 popular GitHub repositories that depend on CodeHollow.FeedReader:

Repository Stars
BedrockLauncher/BedrockLauncher
ohhsodead/arisen-studio
Browse, Download and Install Mods for PlayStation 3 & Xbox 360
Version Downloads Last updated
1.2.6 89,556 3/16/2023
1.2.4 81,749 1/14/2022
1.2.3 520 1/14/2022
1.2.2 33,933 8/19/2021
1.2.1 226,715 5/25/2019
1.2.0 886 5/25/2019
1.1.6 31,425 12/28/2018
1.1.5 14,204 9/19/2018
1.1.4 3,535 8/19/2018
1.1.2 16,987 4/15/2018
1.1.1.1 1,394 4/15/2018
1.1.1 2,856 3/3/2018
1.1.0.2 23,464 9/15/2017
1.1.0.1 2,793 7/21/2017
1.1.0 2,883 6/1/2017
1.0.3.6 1,566 5/12/2017
1.0.3.5 1,233 5/8/2017
1.0.3.4 1,197 5/8/2017
1.0.3.3 1,210 4/4/2017
1.0.3.2 1,486 1/25/2017
1.0.3.1 1,341 1/25/2017
1.0.3 1,269 1/24/2017
1.0.2 1,349 1/23/2017
1.0.1 1,390 1/23/2017
1.0.0 1,255 1/23/2017
0.9.0 1,293 1/16/2017

fix issue