feat: Refactor configuration handling and enhance logging setup; update imports and improve error handling in API methods

This commit is contained in:
bohd4nx
2026-01-18 06:41:08 +02:00
parent 76473993e2
commit d299a1f804
13 changed files with 164 additions and 132 deletions
+1 -10
View File
@@ -28,7 +28,7 @@ def clean_decode(payload: str) -> str:
# 4. Remove binary characters, keep only printable + whitespace
t = ''.join(c for c in t if c in string.printable or c.isspace())
# 5. Extract main text with Ref#
# 5. Extract the main text with Ref#
match = re.search(r'([0-9]*\s*Telegram .*?Ref#[A-Za-z0-9]+)', t, re.S)
if match:
result = match.group(1).strip()
@@ -38,12 +38,3 @@ def clean_decode(payload: str) -> str:
logger.debug(f"Cleaned result: {result}")
return result
# payloads = [
# "te6ccgEBAgEALwABTgAAAAAxMDAwMDAwIFRlbGVncmFtIFN0YXJzIAoKUmVmI1RQb01wegEABkM3ZQ",
# "te6ccgEBAgEANAABTgAAAABUZWxlZ3JhbSBQcmVtaXVtIGZvciAxIHllYXIgCgpSZWYjcgEAEE9OQnM2cmNt",
# "te6ccgEBAgEAMAABTgAAAABUZWxlZ3JhbSBhY2NvdW50IHRvcCB1cCAKClJlZiNrMXpDRQEACFkxd3g"
# ]
# for p in payloads:
# logger.debug("\n" + clean_decode(p) + "\n")