Skip to content

Commit

Permalink
fix(madara): alternative check for chapter title
Browse files Browse the repository at this point in the history
  • Loading branch information
Thundernerd committed Jan 2, 2024
1 parent 7575ccc commit f34ab07
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@ protected override async Task<Result<ChapterList>> GetChapterList(string mangaId
double chapterNumber = GetNumberOfChapter(chapterId);
DateTime dateTime = GetPostDateOfChapter(element);

string chapterTitle = anchorElement.TextContent.Trim();
if (string.IsNullOrEmpty(chapterTitle))
{
anchorElement = element.QuerySelector<IHtmlAnchorElement>(".li__text > a");
chapterTitle = anchorElement?.TextContent.Trim() ?? string.Empty;
}

items.Add(
new ChapterListItem(
ConstructId(chapterUrl),
anchorElement.TextContent.Trim(),
chapterTitle,
chapterNumber,
dateTime.Date,
chapterUrl));
Expand Down

0 comments on commit f34ab07

Please sign in to comment.