Skip to content

Commit

Permalink
#22 コメントの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
TakenPt committed Apr 2, 2024
1 parent d46d7b0 commit 6231fe0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Epub/KoeBook.Epub/Services/ScrapingNaroService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public async ValueTask<EpubDocument> ScrapingAsync(string url, string coverFileP
}
}

// title(作品における、class = "chapter_title" に当たるもの)が同じSectionは同じChapterに入れる
string? chapterTitle = null;
await foreach (var (title, section) in LoadDetailsAsync(context, novelInfo, imageDirectory, ct).ConfigureAwait(false).WithCancellation(ct))
{
Expand Down Expand Up @@ -121,6 +122,7 @@ public async ValueTask<EpubDocument> ScrapingAsync(string url, string coverFileP
var mainText = doc.QuerySelector("#novel_honbun")
?? throw new EbookException(ExceptionType.WebScrapingFailed, "本文がありません");

// なろうの本文は、1行が1つのpタグで構成されているので、本文のChildrenを1つずつ確認していく。
foreach (var item in mainText.Children)
{
if (item is not IHtmlParagraphElement)
Expand Down

0 comments on commit 6231fe0

Please sign in to comment.