diff --git a/src/LunaTranslator/cishu/japandict.py b/src/LunaTranslator/cishu/japandict.py index b87b7f26..238c9157 100644 --- a/src/LunaTranslator/cishu/japandict.py +++ b/src/LunaTranslator/cishu/japandict.py @@ -10,7 +10,7 @@ class japandict(cishubase): html = requests.get( link, proxies=self.proxy, - ).content + ).content.replace(b"padding-top:60px !important", b"") base64_content = base64.b64encode(html).decode("utf-8") saver[link] = f"data:application/octet-stream;base64,{base64_content}" @@ -21,8 +21,11 @@ class japandict(cishubase): proxies=self.proxy, ).text + check = get_element_by("class", "alert-heading", html) + if check: + return res = get_element_by("class", "list-group list-group-flush", html) - if res is None: + if not res: return ts = [] saver = {} diff --git a/src/LunaTranslator/cishu/jisho.py b/src/LunaTranslator/cishu/jisho.py index e8798a32..ab5e1a1b 100644 --- a/src/LunaTranslator/cishu/jisho.py +++ b/src/LunaTranslator/cishu/jisho.py @@ -100,7 +100,7 @@ document.querySelectorAll('.tab-widget_xxxxxx_internal .tab-button_xxxx_internal if get_element_by("id", "no-matches", html): return res = get_element_by("id", "page_container", html) - if res is None: + if not res: return res = ( res.replace('href="//', 'href="https://') diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index e532f430..ea7f8e62 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 52) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)