From 2538a297888faa20d49fb888e343d328aff6490a Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 31 Jul 2023 23:05:29 +0200 Subject: [PATCH] MangaKatana fix search result characters --- Tranga/Connectors/MangaKatana.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/Connectors/MangaKatana.cs b/Tranga/Connectors/MangaKatana.cs index 6c7179d..6205d38 100644 --- a/Tranga/Connectors/MangaKatana.cs +++ b/Tranga/Connectors/MangaKatana.cs @@ -22,7 +22,7 @@ public class MangaKatana : Connector protected override Publication[] GetPublicationsInternal(string publicationTitle = "") { commonObjects.logger?.WriteLine(this.GetType().ToString(), $"Getting Publications (title={publicationTitle})"); - string sanitizedTitle = string.Concat(Regex.Matches(publicationTitle, "[A-z]* *")).ToLower().Replace(' ', '_'); + string sanitizedTitle = string.Join('_', Regex.Matches(publicationTitle, "[A-z]*").Where(m => m.Value.Length > 0)).ToLower(); string requestUrl = $"https://mangakatana.com/?search={sanitizedTitle}&search_by=book_name"; DownloadClient.RequestResult requestResult = downloadClient.MakeRequest(requestUrl, 1);