feat(News): refactor news service and add sentiment tracking
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using FinlyticCore.Dtos.News;
|
||||
|
||||
namespace FinlyticNews.Adapters.Discovery;
|
||||
|
||||
/// <summary>
|
||||
/// Abstract base class representing an adapter capable of extracting article URLs from web content.
|
||||
/// </summary>
|
||||
public abstract class ArticleDiscoveryAdapter
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the unique adapter keyword name used for matching (e.g. "rss", "html").
|
||||
/// </summary>
|
||||
public abstract string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Extracts a list of absolute article URLs from the retrieved web/feed page content.
|
||||
/// </summary>
|
||||
/// <param name="content">The raw text or XML content loaded from the source.</param>
|
||||
/// <param name="sourceUrl">The original URL of the source page (used to resolve relative links).</param>
|
||||
/// <returns>A list of resolved absolute URLs.</returns>
|
||||
public abstract List<DiscoveredArticle> ExtractUrls(string content, string sourceUrl);
|
||||
}
|
||||
Reference in New Issue
Block a user