From 08f26dd21d69c705d30d97d76365bd0d9b3eefeb Mon Sep 17 00:00:00 2001 From: TheyCallMeTravis <130942749+TheyCallMeTravis@users.noreply.github.com> Date: Fri, 14 Mar 2025 21:18:51 -0500 Subject: [PATCH 1/3] add referer to DownloadChapterImages --- Tranga/MangaConnectors/WeebCentral.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/MangaConnectors/WeebCentral.cs b/Tranga/MangaConnectors/WeebCentral.cs index 1ed1438..6dd82fd 100644 --- a/Tranga/MangaConnectors/WeebCentral.cs +++ b/Tranga/MangaConnectors/WeebCentral.cs @@ -210,6 +210,6 @@ public class Weebcentral : MangaConnector document.DocumentNode.SelectNodes($"//section[@hx-get='{chapter.url}/images']/img")?.ToArray() ?? []; string[] urls = imageNodes.Select(imgNode => imgNode.GetAttributeValue("src", "")).ToArray(); - return DownloadChapterImages(urls, chapter, RequestType.MangaImage, progressToken: progressToken); + return DownloadChapterImages(urls, chapter, RequestType.MangaImage, progressToken: progressToken, referrer: "https://weebcentral.com/"); } -} \ No newline at end of file +} From 3324ed6e4aa4b2ff618f0e42068d14b30d4c052a Mon Sep 17 00:00:00 2001 From: TheyCallMeTravis <130942749+TheyCallMeTravis@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:29:09 -0500 Subject: [PATCH 2/3] Weebcentral - Fix Search Results Parse --- Tranga/MangaConnectors/WeebCentral.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/MangaConnectors/WeebCentral.cs b/Tranga/MangaConnectors/WeebCentral.cs index 6dd82fd..861b8aa 100644 --- a/Tranga/MangaConnectors/WeebCentral.cs +++ b/Tranga/MangaConnectors/WeebCentral.cs @@ -44,7 +44,7 @@ public class Weebcentral : MangaConnector if (document.DocumentNode.SelectNodes("//article") == null) return []; - List urls = document.DocumentNode.SelectNodes("/html/body/article/a[@class='link link-hover']") + List urls = document.DocumentNode.SelectNodes("/html/body/article/a[@class='link link-hover tooltip tooltip-bottom']") .Select(elem => elem.GetAttributeValue("href", "")).ToList(); HashSet ret = new(); From 6ed8ff1d52c892611df941e41df6790bf2129206 Mon Sep 17 00:00:00 2001 From: TheyCallMeTravis <130942749+TheyCallMeTravis@users.noreply.github.com> Date: Tue, 18 Mar 2025 10:12:42 -0500 Subject: [PATCH 3/3] webtoons - fix search regex parsing --- Tranga/MangaConnectors/Webtoons.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tranga/MangaConnectors/Webtoons.cs b/Tranga/MangaConnectors/Webtoons.cs index 9e78290..aaa20b1 100644 --- a/Tranga/MangaConnectors/Webtoons.cs +++ b/Tranga/MangaConnectors/Webtoons.cs @@ -56,7 +56,7 @@ public class Webtoons : MangaConnector Log($"Failed to retrieve site"); return null; } - Regex regex = new Regex(@".*webtoons\.com/en/(?[^/]+)/(?[^/]+)/list\?title_no=(?<id>\d+).*"); + Regex regex = new Regex(@".*webtoons\.com\/en\/(?<category>[^\/]+)\/(?<title>[^\/]+)\/list\?title_no=(?<id>\d+).*"); Match match = regex.Match(url); if(match.Success) { @@ -110,7 +110,7 @@ public class Webtoons : MangaConnector HtmlNode posterNode = document.DocumentNode.SelectSingleNode("//div[contains(@class, 'detail_body') and contains(@class, 'banner')]"); - Regex regex = new Regex(@"url\((?<url>.*?)\)"); + Regex regex = new Regex(@"url\('(?<url>.*?)'\)"); Match match = regex.Match(posterNode.GetAttributeValue("style", "")); string posterUrl = match.Groups["url"].Value; @@ -270,4 +270,4 @@ internal class PublicationManager { public string Title { get; set; } public string Category { get; set; } public string Id { get; set; } -} \ No newline at end of file +}