Compare commits

..

No commits in common. "a4f67c9ab4bbb3036d40fa51f530869e85532401" and "00c1cd56b80adb334620e1f72caccaa4975868c6" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -82,11 +82,12 @@ public class Server
response.OutputStream.Write(content is not null
? Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(content))
: Array.Empty<byte>());
response.OutputStream.Close();
}
catch (HttpListenerException)
{
}
response.OutputStream.Close();
}
}

View File

@ -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.Join('_', Regex.Matches(publicationTitle, "[A-z]*").Where(m => m.Value.Length > 0)).ToLower();
string sanitizedTitle = string.Concat(Regex.Matches(publicationTitle, "[A-z]* *")).ToLower().Replace(' ', '_');
string requestUrl = $"https://mangakatana.com/?search={sanitizedTitle}&search_by=book_name";
DownloadClient.RequestResult requestResult =
downloadClient.MakeRequest(requestUrl, 1);
@ -48,8 +48,6 @@ public class MangaKatana : Connector
HtmlDocument document = new();
document.LoadHtml(htmlString);
IEnumerable<HtmlNode> searchResults = document.DocumentNode.SelectNodes("//*[@id='book_list']/div");
if (searchResults is null || !searchResults.Any())
return Array.Empty<Publication>();
List<string> urls = new();
foreach (HtmlNode mangaResult in searchResults)
{