Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
fix: 链接格式错误未正确捕捉
Browse files Browse the repository at this point in the history
  • Loading branch information
shing-yu committed Feb 7, 2024
1 parent d2b6486 commit 77b5c96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fanqie_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77b5c96

Please sign in to comment.