From 77b5c964fd38a8cc2b7330a03f022af2ae581d53 Mon Sep 17 00:00:00 2001 From: shingyu Date: Thu, 8 Feb 2024 01:35:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=93=BE=E6=8E=A5=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=9C=AA=E6=AD=A3=E7=A1=AE=E6=8D=95=E6=8D=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fanqie_batch.py | 2 +- src/function.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fanqie_batch.py b/src/fanqie_batch.py index 30d7f8f..ac9d45a 100644 --- a/src/fanqie_batch.py +++ b/src/fanqie_batch.py @@ -76,7 +76,7 @@ def fanqie_b(encoding, user_agent, path_choice, data_folder): else: print(Fore.YELLOW + Style.BRIGHT + f"无法识别的内容:第{i}行\n内容:{line}") return "file syntax is incorrect" - except TypeError: + except AttributeError: print(Fore.YELLOW + Style.BRIGHT + f"链接无法识别:第{i}行\n内容:{line}") return "file syntax is incorrect" diff --git a/src/function.py b/src/function.py index 4a713a0..cd9c0e9 100644 --- a/src/function.py +++ b/src/function.py @@ -291,7 +291,7 @@ def get_parameter(retry): break else: print(Fore.YELLOW + Style.BRIGHT + "无法识别的内容,请重新输入。") - except TypeError: + except AttributeError: print(Fore.YELLOW + Style.BRIGHT + "链接无法识别,请检查并重新输入。") continue # 当用户按下Ctrl+C是,可以自定义起始章节id