added try around getting urls

This commit is contained in:
merlinmarijn 2025-03-03 23:43:35 +01:00
parent ed3ca5dba8
commit 59511056d0

View File

@ -37,8 +37,14 @@ public class Manganato : MangaConnector
List<string> urls = new();
foreach (HtmlNode mangaResult in searchResults)
{
try
{
urls.Add(mangaResult.Descendants("h3").First(n => n.HasClass("story_name"))
.Descendants("a").First().GetAttributeValue("href", ""));
} catch
{
//failed to get a url, send it to the void
}
}
HashSet<Manga> ret = new();