fix: separate news from publications and add employee refresh

This commit is contained in:
Anton
2026-05-13 16:11:13 +03:00
parent 5b9d71426d
commit 8e19dc9f35
10 changed files with 207 additions and 11 deletions

View File

@@ -387,7 +387,7 @@ def _infer_section_type(title: str, nodes: list) -> str:
lowered = title.lower()
if _has_table(nodes):
return "table"
if "публикац" in lowered:
if _is_publications_title(lowered):
return "publications"
if "учебные курсы" in lowered:
return "courses_by_year"
@@ -398,6 +398,10 @@ def _infer_section_type(title: str, nodes: list) -> str:
return "generic"
def _is_publications_title(lowered_title: str) -> bool:
return lowered_title.startswith("публикац")
def _has_table(nodes: list) -> bool:
return any(isinstance(node, Tag) and (node.name == "table" or node.find("table")) for node in nodes)