清理已删除的测试文件,准备云端部署

This commit is contained in:
ztb-system
2026-02-25 18:17:00 +08:00
parent 5f93dbe5e4
commit 305f6b342c
29 changed files with 143 additions and 2536 deletions

View File

@@ -94,23 +94,8 @@ class TaizhouSpider(BaseSpider):
"来源": self.config["name"],
}
# 解析特定格式的标题:[招标文件]项目名称[批准文号]
title_pattern = r"(?:\[招标文件\])?\s*(.*)\s*\[([A-Z0-9]+)\]\s*$"
match = re.search(title_pattern, title)
if match:
item["项目名称"] = match.group(1).strip()
item["项目批准文号"] = match.group(2).strip()
else:
# 如果正则匹配失败,直接使用标题作为项目名称
project_name = title
# 尝试从标题中提取批准文号
number_pattern = r"\[([A-Z0-9]+)\]\s*$"
match = re.search(number_pattern, project_name)
if match:
item["项目批准文号"] = match.group(1).strip()
# 从项目名称中删除批准文号部分
project_name = project_name[:match.start()].strip()
item["项目名称"] = project_name
# 解析标题:提取项目名称批准文号(统一规则)
item.update(self._parse_title(title))
if title and href:
items.append(item)
@@ -133,23 +118,8 @@ class TaizhouSpider(BaseSpider):
"来源": self.config["name"],
}
# 解析特定格式的标题:[招标文件]项目名称[批准文号]
title_pattern = r"(?:\[招标文件\])?\s*(.*)\s*\[([A-Z0-9]+)\]\s*$"
match = re.search(title_pattern, title)
if match:
item["项目名称"] = match.group(1).strip()
item["项目批准文号"] = match.group(2).strip()
else:
# 如果正则匹配失败,直接使用标题作为项目名称
project_name = title
# 尝试从标题中提取批准文号
number_pattern = r"\[([A-Z0-9]+)\]\s*$"
match = re.search(number_pattern, project_name)
if match:
item["项目批准文号"] = match.group(1).strip()
# 从项目名称中删除批准文号部分
project_name = project_name[:match.start()].strip()
item["项目名称"] = project_name
# 解析标题:提取项目名称批准文号(统一规则)
item.update(self._parse_title(title))
items.append(item)
return items