From ba7e71452b7712cb9cac0fe9f53e0198ee43c722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 22 May 2024 02:30:53 +0800 Subject: [PATCH] Update jisho.py --- LunaTranslator/LunaTranslator/cishu/jisho.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LunaTranslator/LunaTranslator/cishu/jisho.py b/LunaTranslator/LunaTranslator/cishu/jisho.py index e7fdaa6d..944b60bd 100644 --- a/LunaTranslator/LunaTranslator/cishu/jisho.py +++ b/LunaTranslator/LunaTranslator/cishu/jisho.py @@ -89,7 +89,13 @@ class jisho(cishubase): res = get_element_by_id("page_container", html) if res is None: return - res = res.replace('href="//', 'href="https://') + res = ( + res.replace('href="//', 'href="https://') + .replace("

Discussions

", "") + .replace( + 'Log in to talk about this word.', "" + ) + ) ss = re.search('href="https://assets.jisho.org/assets/application(.*)"', html) stl = requests.get(ss.group()[6:-1], proxies=getproxy()).text