mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 14:24:31 +00:00
feat: Refactor configuration handling and enhance logging setup; update imports and improve error handling in API methods
This commit is contained in:
+1
-10
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user