From ef3f687db0f53f026e808c4284e084255c9e9dd5 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 17 Jun 2026 15:08:30 -0400 Subject: Update portal to avoid TLS fingerprinting Signed-off-by: Andrew Opalach --- src/portal/py/modules/common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/portal/py/modules/common.py') diff --git a/src/portal/py/modules/common.py b/src/portal/py/modules/common.py index 3b87884..f4c8b8c 100644 --- a/src/portal/py/modules/common.py +++ b/src/portal/py/modules/common.py @@ -1,9 +1,10 @@ from datetime import datetime, timezone -def reformat_pixiv_date(date_str: str) -> datetime: +def get_current_utc_time() -> datetime: + return datetime.now(timezone.utc) + +def parse_pixiv_date(date_str: str) -> datetime: rindex = date_str.rfind(':') date_str = date_str[:rindex] + date_str[rindex + 1:] - return datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S%z") + return datetime.strptime(date_str, '%Y-%m-%dT%H:%M:%S%z') -def get_current_utc_time() -> datetime: - return datetime.now(timezone.utc) -- cgit v1.2.3-101-g0448