diff --git a/Tranga/MangaConnectors/Mangaworld.cs b/Tranga/MangaConnectors/Mangaworld.cs index 9558a73..d5725d7 100644 --- a/Tranga/MangaConnectors/Mangaworld.cs +++ b/Tranga/MangaConnectors/Mangaworld.cs @@ -153,10 +153,13 @@ public class Mangaworld: MangaConnector { foreach (HtmlNode volNode in document.DocumentNode.SelectNodes("//div[contains(concat(' ',normalize-space(@class),' '),'volume-element')]")) { - string volume = volNode.SelectNodes("div").First(node => node.HasClass("volume")).SelectSingleNode("p").InnerText.Split(' ')[^1]; + string volume = Regex.Match(volNode.SelectNodes("div").First(node => node.HasClass("volume")).SelectSingleNode("p").InnerText, + @"[Vv]olume ([0-9]+).*").Groups[1].Value; foreach (HtmlNode chNode in volNode.SelectNodes("div").First(node => node.HasClass("volume-chapters")).SelectNodes("div")) { - 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, volume, number, url)); }