From e0a7d1a18794597bd1817f2598a97867f1d0f942 Mon Sep 17 00:00:00 2001 From: Glax Date: Mon, 26 Aug 2024 20:28:40 +0200 Subject: [PATCH] Fix #220 Mangaworld Chapter number parsing --- Tranga/MangaConnectors/Mangaworld.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tranga/MangaConnectors/Mangaworld.cs b/Tranga/MangaConnectors/Mangaworld.cs index 7cbe7ef..1140468 100644 --- a/Tranga/MangaConnectors/Mangaworld.cs +++ b/Tranga/MangaConnectors/Mangaworld.cs @@ -169,7 +169,8 @@ public class Mangaworld: MangaConnector { foreach (HtmlNode chNode in chaptersWrapper.SelectNodes("div").Where(node => node.HasClass("chapter"))) { - string number = chNode.SelectSingleNode("a").SelectSingleNode("span").InnerText.Split(" ")[^1]; + string number = Regex.Match(chNode.SelectSingleNode("a").SelectSingleNode("span").InnerText, + @"[Cc]apitolo ([0-9]+).*").Groups[1].Value; string url = chNode.SelectSingleNode("a").GetAttributeValue("href", ""); ret.Add(new Chapter(manga, null, null, number, url)); }