调整标题匹配

This commit is contained in:
liuwei
2025-02-28 09:07:09 +08:00
parent c74d5db042
commit 078819cd17

View File

@@ -43,7 +43,7 @@ def fetch_posts(base_url, posts_per_batch=10):
post_title = post.get_text().strip()
# 检查帖子是否已下载
match = re.search(r'No\.(\d+)', post_title)
match = re.search(r'(?:[Nn][Oo]|[Vv][Oo][Ll])\.(\d+)', post_title) # 支持 "No." 或 "
folder_name = match.group(1) if match else f"unknown_{len(posts) + 1}"
folder_path = os.path.join(download_root, folder_name)