{"id":19993678,"url":"https://github.com/arminreiter/FeedReader","last_synced_at":"2025-05-04T12:32:20.872Z","repository":{"id":44997781,"uuid":"78937850","full_name":"arminreiter/FeedReader","owner":"arminreiter","description":"C# RSS and ATOM Feed reader library. Supports RSS 0.91, 0.92, 1.0, 2.0 and ATOM. Tested with multiple languages and feeds.","archived":false,"fork":false,"pushed_at":"2023-03-19T11:28:26.000Z","size":897,"stargazers_count":303,"open_issues_count":14,"forks_count":78,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-08T19:13:06.859Z","etag":null,"topics":["atom","atom-feed","atom-reader","feed-reader","rss","rss-feed","rss-reader"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arminreiter.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-14T12:04:50.000Z","updated_at":"2024-10-07T16:08:52.000Z","dependencies_parsed_at":"2023-01-29T18:30:27.225Z","dependency_job_id":null,"html_url":"https://github.com/arminreiter/FeedReader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arminreiter%2FFeedReader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arminreiter%2FFeedReader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arminreiter%2FFeedReader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arminreiter%2FFeedReader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arminreiter","download_url":"https://codeload.github.com/arminreiter/FeedReader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224393929,"owners_count":17303724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","atom-feed","atom-reader","feed-reader","rss","rss-feed","rss-reader"],"created_at":"2024-11-13T04:52:53.700Z","updated_at":"2024-11-13T04:57:00.022Z","avatar_url":"https://github.com/arminreiter.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# FeedReader\nFeedReader 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**.\nDeveloped because tested existing libraries do not work with different languages, encodings or have other issues. \nLibrary tested with multiple languages, encodings and feeds.\n\nFeedReader library is available as NuGet package: https://www.nuget.org/packages/CodeHollow.FeedReader/\n\n## Usage\nThe simplest way to read a feed and show the information is:\n```csharp\n    var feed = await FeedReader.ReadAsync(\"https://arminreiter.com/feed\");\n\n    Console.WriteLine(\"Feed Title: \" + feed.Title);\n    Console.WriteLine(\"Feed Description: \" + feed.Description);\n    Console.WriteLine(\"Feed Image: \" + feed.ImageUrl);\n    // ...\n    foreach(var item in feed.Items)\n    {\n        Console.WriteLine(item.Title + \" - \" + item.Link);\n    }\n```\n\nThere 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:\n\n```csharp\n    var feed = await FeedReader.ReadAsync(\"https://arminreiter.com/feed\");\n\n    Console.WriteLine(\"Feed Title: \" + feed.Title);\n            \n    if(feed.Type == FeedType.Rss_2_0)\n    {\n        var rss20feed = (Feeds.Rss20Feed)feed.SpecificFeed;\n        Console.WriteLine(\"Generator: \" + rss20feed.Generator);\n    }\n```\n\nIf the url to the feed is not known, then you can use FeedReader.GetFeedUrlsFromUrl(url) to parse the url from the html webpage:\n\n```csharp\n    string url = \"arminreiter.com\";\n    var urls = FeedReader.GetFeedUrlsFromUrl(url);\n            \n    string feedUrl;\n    if (urls.Count() \u003c 1) // no url - probably the url is already the right feed url\n        feedUrl = url;\n    else if (urls.Count() == 1)\n        feedUrl = urls.First().Url;\n    else if (urls.Count() == 2) // if 2 urls, then its usually a feed and a comments feed, so take the first per default\n        feedUrl = urls.First().Url;\n    else\n    {\n        // show all urls and let the user select (or take the first or ...)\n        // ...\n    }\n\n    var readerTask = FeedReader.ReadAsync(feedUrl);\n    readerTask.ConfigureAwait(false);\n\n    foreach (var item in readerTask.Result.Items)\n    {\n        Console.WriteLine(item.Title + \" - \" + item.Link);\n        // ...\n    }\n```\n\n\nThe code contains a sample console application: https://github.com/codehollow/FeedReader/tree/master/FeedReader.ConsoleSample\n\n\n## Specifications\n- RSS 0.91: http://www.rssboard.org/rss-0-9-1-netscape\n- RSS 0.92: http://backend.userland.com/rss092, http://www.rssboard.org/rss-0-9-2\n- RSS 1.0 : http://web.resource.org/rss/1.0/spec\n- RSS 2.0 : https://validator.w3.org/feed/docs/rss2.html\n- ATOM    : https://validator.w3.org/feed/docs/atom.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farminreiter%2FFeedReader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farminreiter%2FFeedReader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farminreiter%2FFeedReader/lists"}