From 34f8371d7529ada5c2b419a4f88e6e3979b1235d Mon Sep 17 00:00:00 2001 From: Anton Melser Date: Mon, 8 Jul 2024 20:20:44 +0800 Subject: [PATCH] Inverse invalid check The check should remove the trailing slash only if it has one, not only if it *doesn't* have one. Currently this has the effect of downloading a potentially different book (usually) if you *don't* put a slash and failing to download the chapters if you *do* put a slash. --- sources/zh/ixdzs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/zh/ixdzs.py b/sources/zh/ixdzs.py index 1ad0327f9..303db5acb 100644 --- a/sources/zh/ixdzs.py +++ b/sources/zh/ixdzs.py @@ -19,7 +19,7 @@ def rectify_url(url: str) -> str: """ This manually 'fixes' URLs and prepares them for usage later on in string templating. """ - url = url[:-1] if not url.endswith("/") else url + url = url[:-1] if url.endswith("/") else url if "https://tw.m.ixdzs.com" in url: return url.replace("https://tw.m.ixdzs.com", "https://ixdzs8.tw") if "https://www.aixdzs.com" in url: