Fix Weebcentral

This commit is contained in:
Glax 2025-04-01 02:09:28 +02:00
parent 91e033a2ec
commit b955d41530

View File

@ -36,10 +36,10 @@ public class Weebcentral : MangaConnector
private (Manga, List<Author>?, List<MangaTag>?, List<Link>?, List<MangaAltTitle>?)[] ParsePublicationsFromHtml(HtmlDocument document)
{
if (document.DocumentNode.SelectNodes("//article") == null)
if (document.DocumentNode.SelectNodes("//article").Count < 1)
return [];
var urls = document.DocumentNode.SelectNodes("/html/body/article/a[@class='link link-hover']")
var urls = document.DocumentNode.SelectNodes("/html/body/article/a[contains(concat(' ',normalize-space(@class),' '),' link ')]")
.Select(elem => elem.GetAttributeValue("href", "")).ToList();
List<(Manga, List<Author>?, List<MangaTag>?, List<Link>?, List<MangaAltTitle>?)> ret = new();