From 5352cca0584a418afee82c5c60c75abf3002f7a9 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 23 Oct 2023 17:01:26 +0200 Subject: [PATCH] Possible fix for #72 RegexMatching was off for last element sometimes on bato --- Tranga/MangaConnectors/Bato.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tranga/MangaConnectors/Bato.cs b/Tranga/MangaConnectors/Bato.cs index 1768f61..4ebe67a 100644 --- a/Tranga/MangaConnectors/Bato.cs +++ b/Tranga/MangaConnectors/Bato.cs @@ -205,7 +205,8 @@ public class Bato : MangaConnector string weirdString = images.OuterHtml; string weirdString2 = Regex.Match(weirdString, @"props=\""(.*)}\""").Groups[1].Value; - string[] urls = Regex.Matches(weirdString2, @"https:\/\/[A-z\-0-9\.\?\&\;\=\/]*").Select(m => m.Value.Replace("\\"]", "").Replace("amp;", "")).ToArray(); + string[] urls = Regex.Matches(weirdString2, @"(https:\/\/[A-z\-0-9\.\?\&\;\=\/]+)\\") + .Select(match => match.Groups[1].Value.Replace("&", "&")).ToArray(); return urls; }