Compare commits
No commits in common. "2538a297888faa20d49fb888e343d328aff6490a" and "a63154b581e3a028ddbba047323719741bef9b41" have entirely different histories.
2538a29788
...
a63154b581
@ -82,11 +82,12 @@ public class Server
|
|||||||
response.OutputStream.Write(content is not null
|
response.OutputStream.Write(content is not null
|
||||||
? Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(content))
|
? Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(content))
|
||||||
: Array.Empty<byte>());
|
: Array.Empty<byte>());
|
||||||
response.OutputStream.Close();
|
|
||||||
}
|
}
|
||||||
catch (HttpListenerException)
|
catch (HttpListenerException)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
response.OutputStream.Close();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,7 +22,7 @@ public class MangaKatana : Connector
|
|||||||
protected override Publication[] GetPublicationsInternal(string publicationTitle = "")
|
protected override Publication[] GetPublicationsInternal(string publicationTitle = "")
|
||||||
{
|
{
|
||||||
commonObjects.logger?.WriteLine(this.GetType().ToString(), $"Getting Publications (title={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";
|
string requestUrl = $"https://mangakatana.com/?search={sanitizedTitle}&search_by=book_name";
|
||||||
DownloadClient.RequestResult requestResult =
|
DownloadClient.RequestResult requestResult =
|
||||||
downloadClient.MakeRequest(requestUrl, 1);
|
downloadClient.MakeRequest(requestUrl, 1);
|
||||||
@ -48,8 +48,6 @@ public class MangaKatana : Connector
|
|||||||
HtmlDocument document = new();
|
HtmlDocument document = new();
|
||||||
document.LoadHtml(htmlString);
|
document.LoadHtml(htmlString);
|
||||||
IEnumerable<HtmlNode> searchResults = document.DocumentNode.SelectNodes("//*[@id='book_list']/div");
|
IEnumerable<HtmlNode> searchResults = document.DocumentNode.SelectNodes("//*[@id='book_list']/div");
|
||||||
if (searchResults is null || !searchResults.Any())
|
|
||||||
return Array.Empty<Publication>();
|
|
||||||
List<string> urls = new();
|
List<string> urls = new();
|
||||||
foreach (HtmlNode mangaResult in searchResults)
|
foreach (HtmlNode mangaResult in searchResults)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user