SimpleRSS 2.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SimpleRSS --version 2.1.1
NuGet\Install-Package SimpleRSS -Version 2.1.1
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="SimpleRSS" Version="2.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleRSS" Version="2.1.1" />
<PackageReference Include="SimpleRSS" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SimpleRSS --version 2.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SimpleRSS, 2.1.1"
#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.
#:package SimpleRSS@2.1.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SimpleRSS&version=2.1.1
#tool nuget:?package=SimpleRSS&version=2.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SimpleRSS
A lightweight .NET library for reading RSS, Atom, and RDF syndication feeds.
Version 2.x is a modern rewrite for .NET 8+ with async HTTP support, feed metadata, typed dates, caching, and dependency injection.
Install
dotnet add package SimpleRSS
Quick start
using SimpleRSS;
using var reader = new FeedReader();
var feed = await reader.GetFeedAsync("https://example.com/feed.rss");
Console.WriteLine(feed.Title);
foreach (var item in feed.Items)
{
Console.WriteLine($"{item.Published:g}\t{item.Title}");
Console.WriteLine(item.Link);
}
Note: Feed
SummaryandContentfields may contain HTML. Sanitize before rendering in a UI.
Dependency injection
builder.Services.AddSimpleRss(options => options with { MaxConcurrentRequests = 8 });
public class FeedService(FeedReader reader)
{
public Task<Feed> LoadAsync(string url) => reader.GetFeedAsync(url);
}
Response caching is opt-in when using dependency injection:
builder.Services.AddSimpleRss(options => options with { EnableResponseCache = true });
Parse local XML
var feed = FeedReader.Parse(File.ReadAllText("feed.xml"));
await using var stream = File.OpenRead("feed.xml");
var feedFromStream = await FeedReader.ParseAsync(stream);
Read multiple feeds
GetFeedsAsync returns per-feed results and supports partial success:
using var reader = new FeedReader();
var results = await reader.GetFeedsAsync([
"https://example.com/feed-a.rss",
"https://example.com/feed-b.rss"
]);
foreach (var result in results.Where(result => result.IsSuccess))
{
Console.WriteLine(result.Feed!.Title);
}
Combine items across feeds:
using var reader = new FeedReader(new FeedReaderOptions
{
InterleaveMultipleFeeds = true
});
var items = await reader.GetCombinedItemsAsync([
"https://example.com/feed-a.rss",
"https://example.com/feed-b.rss"
]);
Discover feeds from a website
using var discovery = new FeedDiscovery(new HttpClient());
var feedUrl = await discovery.DiscoverFeedUrlAsync("https://example.com/blog");
using var reader = new FeedReader();
var feed = await reader.DiscoverAndGetFeedAsync("https://example.com/blog");
Conditional HTTP caching
var cache = new InMemoryFeedResponseCache();
using var reader = new FeedReader(new FeedReaderOptions
{
ResponseCache = cache
});
var feed = await reader.GetFeedAsync("https://example.com/feed.rss");
Supported formats
- RSS 2.0
- Atom 1.0
- RSS 1.0 / RDF
License
Apache-2.0 — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.