2
0

#66 Mangasee empty search breaks

This commit is contained in:
glax 2023-10-14 12:49:18 +02:00
parent f01a786e59
commit 19c9ecb3e7

View File

@ -47,6 +47,11 @@ public class Mangasee : MangaConnector
private Manga[] ParsePublicationsFromHtml(HtmlDocument document)
{
HtmlNode resultsNode = document.DocumentNode.SelectSingleNode("//div[@class='BoxBody']/div[last()]/div[1]/div");
if (resultsNode.Descendants("div").Count() == 1 && resultsNode.Descendants("div").First().HasClass("NoResults"))
{
Log("No results.");
return Array.Empty<Manga>();
}
Log($"{resultsNode.SelectNodes("div").Count} items.");
HashSet<Manga> ret = new();