36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
using System.Reflection.Metadata;
|
|
using System.Text.RegularExpressions;
|
|
using DBConnection.Models;
|
|
using HtmlAgilityPack;
|
|
|
|
namespace WebNovelPortalAPI.Scrapers;
|
|
|
|
public class KakuyomuScraper : AbstractScraper
|
|
{
|
|
protected override string UrlMatchPattern => @"https?:\/\/kakuyomu\.jp\/works\/\d+\/?";
|
|
|
|
protected override string BaseUrlPattern => @"https?:\/\/kakuyomu\.jp";
|
|
|
|
protected override string? WorkTitlePattern => @"//*[@id='workTitle']/a";
|
|
protected override string? AuthorNamePattern => @"//*[@id='workAuthor-activityName']/a";
|
|
protected override string? AuthorLinkPattern => @"//*[@id='workAuthor-activityName']/a";
|
|
|
|
protected override string? ChapterUrlPattern => @"//a[@class='widget-toc-episode-episodeTitle']";
|
|
|
|
protected override string? ChapterNamePattern => @"span";
|
|
|
|
protected override string? ChapterPostedPattern => base.ChapterPostedPattern;
|
|
|
|
protected override string? ChapterUpdatedPattern => base.ChapterUpdatedPattern;
|
|
|
|
protected override string? TagPattern => @"//span[@itemprop='keywords']/a";
|
|
|
|
protected override string? DatePostedPattern => @"//time[@itemprop='datePublished']";
|
|
|
|
protected override string? DateUpdatedPattern => @"//time[@itemprop='dateModified']";
|
|
|
|
public string? ScrapeChapterContent(string chapterUrl)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
} |