mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-14 20:33:19 +02:00
added try around getting urls
This commit is contained in:
parent
ed3ca5dba8
commit
59511056d0
@ -37,8 +37,14 @@ public class Manganato : MangaConnector
|
|||||||
List<string> urls = new();
|
List<string> urls = new();
|
||||||
foreach (HtmlNode mangaResult in searchResults)
|
foreach (HtmlNode mangaResult in searchResults)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
urls.Add(mangaResult.Descendants("h3").First(n => n.HasClass("story_name"))
|
urls.Add(mangaResult.Descendants("h3").First(n => n.HasClass("story_name"))
|
||||||
.Descendants("a").First().GetAttributeValue("href", ""));
|
.Descendants("a").First().GetAttributeValue("href", ""));
|
||||||
|
} catch
|
||||||
|
{
|
||||||
|
//failed to get a url, send it to the void
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet<Manga> ret = new();
|
HashSet<Manga> ret = new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user