search-wrapper
Some checks failed
Deploy on push / deploy (push) Failing after 4m31s

This commit is contained in:
2025-08-23 14:08:34 +03:00
parent 2d8547c980
commit 00a866876c
8 changed files with 120 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
from utils.extract_text import extract_text
from utils.logger import root_logger as logger
def validate_html_content(html_content: str) -> tuple[bool, str]:
"""
Проверяет валидность HTML контента через trafilatura.
@@ -31,4 +32,4 @@ def validate_html_content(html_content: str) -> tuple[bool, str]:
return bool(extracted), extracted or ""
except Exception as e:
logger.error(f"HTML validation error: {e}", exc_info=True)
return False, f"Invalid HTML content: {e!s}"
return False, f"Invalid HTML content: {e!s}"