From d8d292098360452ab9d2ce2e3091b5d874635859 Mon Sep 17 00:00:00 2001 From: Nriver <6752679+Nriver@users.noreply.github.com> Date: Wed, 17 Aug 2022 09:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95END=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=AD=A3=E5=88=99,=20=E8=A7=A3=E5=86=B3#14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EpisodeReName.py | 4 ++-- "test/end\345\221\275\345\220\215.txt" | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 "test/end\345\221\275\345\220\215.txt" diff --git a/EpisodeReName.py b/EpisodeReName.py index 4cb7ae8..07510b3 100644 --- a/EpisodeReName.py +++ b/EpisodeReName.py @@ -387,7 +387,7 @@ def get_season_and_ep(file_path): # 兼容v2命名 '(\d{1,4}(\.5)?)[Vv]?\d?', # 兼容END命名 - '(\d{1,4}(\.5)?)\s?(?i:END)?', + '(\d{1,4}(\.5)?)\s?(?:_)?(?i:END)?', ] # 括号和内容组合起来 pats = [] @@ -493,7 +493,7 @@ def extract_ending_ep(s): return ep # 兼容END命名 - pat = '(\d{1,4}(\.5)?)\s?(?i:END)?' + pat = '(\d{1,4}(\.5)?)\s?(?:_)?(?i:END)?' ep = None res_sub = re.search(pat, s) if res_sub: diff --git "a/test/end\345\221\275\345\220\215.txt" "b/test/end\345\221\275\345\220\215.txt" new file mode 100644 index 0000000..2e82c6b --- /dev/null +++ "b/test/end\345\221\275\345\220\215.txt" @@ -0,0 +1,7 @@ +[12END] +[12_END] +[12_end] +[12_End] +[12End] +[12 End] +[12 end]