From 488a19be12df8ad5e9b8c57d085abcf29615d5b2 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Sun, 17 Jul 2022 22:16:09 +0800 Subject: [PATCH] =?UTF-8?q?2.5.14=20-=20=E6=94=B9=E8=BF=9B=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parser/analyser/raw_parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser/analyser/raw_parser.py b/src/parser/analyser/raw_parser.py index a9b3b8c2..d4e54e84 100644 --- a/src/parser/analyser/raw_parser.py +++ b/src/parser/analyser/raw_parser.py @@ -93,7 +93,8 @@ class RawParser: split_space = name.split(" ") for idx, item in enumerate(split_space): if re.search(r"^[\u4e00-\u9fa5]{2,}", item) is not None: - split = [item.strip(), " ".join(split_space[idx+1:]).strip()] + split_space.remove(item) + split = [item.strip(), " ".join(split_space).strip()] break for item in split: if re.search(r"[\u0800-\u4e00]{2,}", item) and not name_jp: @@ -161,6 +162,6 @@ class RawParser: if __name__ == "__main__": test = RawParser() - test_txt = "[SWSUB][7月新番][继母的拖油瓶是我的前女友 / 継母の连れ子が元カノだった][001][GB_JP][AVC][1080P][网盘][无修正] [331.6MB] [复制磁连]" + test_txt = "[SWSUB][7月新番][Love Live! 红小学员][无修正][001][GB_JP][AVC][1080P][网盘][无修正] [331.6MB] [复制磁连]" ep = test.analyse(test_txt) print(f"en:{ep.title_en}, zh:{ep.title_zh}, jp:{ep.title_jp}")