fix: separate news from publications and add employee refresh
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user