Added start of completion status scraping and fixed kakuyomu date posted lookup
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Net.Http.Headers;
|
||||
using System.Text.RegularExpressions;
|
||||
using HtmlAgilityPack;
|
||||
using Common.Models.DBDomain;
|
||||
using Common.Models.Enums;
|
||||
|
||||
namespace WebNovelPortalAPI.Scrapers;
|
||||
|
||||
@@ -38,6 +39,7 @@ public abstract class AbstractScraper : IScraper
|
||||
protected virtual string? TagPattern { get; }
|
||||
protected virtual string? DatePostedPattern { get; }
|
||||
protected virtual string? DateUpdatedPattern { get; }
|
||||
protected virtual NovelStatus DefaultStatus => NovelStatus.Unknown;
|
||||
|
||||
protected async Task<HtmlDocument> GetPage(string url)
|
||||
{
|
||||
@@ -156,7 +158,8 @@ public abstract class AbstractScraper : IScraper
|
||||
LastUpdated = GetLastUpdatedDate(doc, baseUrl, novelUrl),
|
||||
Tags = GetTags(doc, baseUrl, novelUrl),
|
||||
Title = GetNovelTitle(doc, baseUrl, novelUrl),
|
||||
Url = novelUrl
|
||||
Url = novelUrl,
|
||||
Status = DefaultStatus
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user