From 58c4dece90654c9c9c885e91e593e1848a394c43 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: Sat, 25 May 2024 21:54:14 +0800 Subject: [PATCH] repair --- LunaTranslator/LunaTranslator/cishu/mdict.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/LunaTranslator/LunaTranslator/cishu/mdict.py b/LunaTranslator/LunaTranslator/cishu/mdict.py index 84427950..b4ff48b8 100644 --- a/LunaTranslator/LunaTranslator/cishu/mdict.py +++ b/LunaTranslator/LunaTranslator/cishu/mdict.py @@ -2560,11 +2560,13 @@ class mdict(cishubase): # print(keys) for k in keys: content = index.mdx_lookup(k)[0] - - match = re.match("@@@LINK=(.*)\r\n", content) - if match: - match = match.groups()[0] - content = index.mdx_lookup(match)[0] + while True:#あさひ + match = re.match("@@@LINK=(.*)", content.strip()) + if match: + match = match.groups()[0] + content = index.mdx_lookup(match)[0] + else: + break results.append(self.parseashtml(content)) except: from traceback import print_exc