Refactor and novel18 support (added cookie support in general to AbstractScraper.cs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-20 22:04:13 -04:00
parent 12a1f48fbd
commit ceb8a0db8e
59 changed files with 353 additions and 240 deletions

View File

@@ -1,5 +1,6 @@
using System.Reflection.Metadata;
using System.Text.RegularExpressions;
using Common.Models.DBDomain;
using HtmlAgilityPack;
namespace WebNovelPortalAPI.Scrapers;
@@ -34,4 +35,13 @@ public class KakuyomuScraper : AbstractScraper
var datePosted = linkNode.SelectSingleNode(ChapterPostedPattern).Attributes["datetime"].Value;
return (DateTime.Parse(datePosted).ToUniversalTime(), null);
}
protected override IEnumerable<Tag> GetMetadataTags(HtmlDocument document, string baseUrl, string novelUrl)
{
return new List<Tag>
{
Tag.GetSiteTag(baseUrl),
Tag.GetOriginalWorkTag()
};
}
}