Initial implementation of voice works scanning.
This commit is contained in:
16
JSMR.Infrastructure/Http/HtmlLoader.cs
Normal file
16
JSMR.Infrastructure/Http/HtmlLoader.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using HtmlAgilityPack;
|
||||
|
||||
namespace JSMR.Infrastructure.Http;
|
||||
|
||||
public class HtmlLoader(IHttpService httpService) : IHtmlLoader
|
||||
{
|
||||
public async Task<HtmlDocument> GetHtmlDocumentAsync(string url, CancellationToken cancellationToken)
|
||||
{
|
||||
string html = await httpService.GetStringAsync(url, cancellationToken);
|
||||
|
||||
HtmlDocument document = new();
|
||||
document.LoadHtml(html);
|
||||
|
||||
return document;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user