From b3bf523e1e3a673bf9a537ea93fdc0c8cd7be5a7 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 9 Oct 2023 15:28:37 +0200 Subject: [PATCH] Fix #63 Chapter numbering. --- Tranga/MangaConnectors/Mangasee.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tranga/MangaConnectors/Mangasee.cs b/Tranga/MangaConnectors/Mangasee.cs index 33cffe9..22ae2ed 100644 --- a/Tranga/MangaConnectors/Mangasee.cs +++ b/Tranga/MangaConnectors/Mangasee.cs @@ -122,11 +122,10 @@ public class Mangasee : MangaConnector foreach (XElement chapter in chapterItems) { string volumeNumber = "1"; - string chapterName = chapter.Descendants("title").First().Value; - string chapterNumber = Regex.Matches(chapterName, "[0-9]+")[^1].ToString(); - string url = chapter.Descendants("link").First().Value; - url = url.Replace(Regex.Matches(url,"(-page-[0-9])")[0].ToString(),""); + string chapterNumber = Regex.Match(url, @"-chapter-([0-9\.]+)").Groups[1].ToString(); + + url = url.Replace(Regex.Match(url,"(-page-[0-9])").Value,""); chapters.Add(new Chapter(manga, "", volumeNumber, chapterNumber, url)); }