Fix deprecated datetime.utcnow() and test assertion for clean_text

This commit is contained in:
n0mad1k
2026-03-19 08:56:08 -04:00
parent c79f81d9c6
commit 0cfd7dc32d
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import tempfile
import hashlib
import logging
from abc import ABC, abstractmethod
from datetime import datetime
import datetime
from pathlib import Path
from typing import Optional
@@ -119,7 +119,7 @@ class BaseCollector(ABC):
title=self._extract_title(url),
raw_path=final_path,
content_hash=content_hash,
fetch_date=datetime.utcnow().isoformat(),
fetch_date=datetime.datetime.now(datetime.timezone.utc).isoformat(),
etag=etag,
last_modified=last_modified,
char_count=len(content.decode('utf-8', errors='replace')),