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