This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user