Skip to content

Commit

Permalink
修复英文数字名问题
Browse files Browse the repository at this point in the history
  • Loading branch information
DoiiarX committed Jun 25, 2024
1 parent 972647a commit 1eb910e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def get_parse_metadata(html, isbn, log):
# 优化标题格式
title = data.get("题名与责任", f"{isbn}")
if IS_STRIP_TITLE:
pattern = r"([\u4e00-\u9fa5]+[\w\s]+)"
pattern = r"([\u4e00-\u9fa5a-zA-Z0-9]+(?:[\u4e00-\u9fa5a-zA-Z0-9\s]+)?)(?=\s\[[\u4e00-\u9fa5]{2}\])" #
try:
match = re.search(pattern, title)
if match:
Expand Down

0 comments on commit 1eb910e

Please sign in to comment.