diff options
| author | 2026-06-17 15:08:30 -0400 | |
|---|---|---|
| committer | 2026-06-17 15:08:30 -0400 | |
| commit | ef3f687db0f53f026e808c4284e084255c9e9dd5 (patch) | |
| tree | 9271108ff34145b17696344eb727e44756001e12 /src/portal/py/modules/common.py | |
| parent | 22d3be9264087ed80d034df0e805bd8101a7d381 (diff) | |
| download | camu-ef3f687db0f53f026e808c4284e084255c9e9dd5.tar.gz camu-ef3f687db0f53f026e808c4284e084255c9e9dd5.tar.bz2 camu-ef3f687db0f53f026e808c4284e084255c9e9dd5.zip | |
Update portal to avoid TLS fingerprinting
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/portal/py/modules/common.py')
| -rw-r--r-- | src/portal/py/modules/common.py | 9 |
1 files changed, 5 insertions, 4 deletions
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) |