23 lines
899 B
C#
23 lines
899 B
C#
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);
|
|
}
|