Add Telegram finder source

This commit is contained in:
2026-07-14 08:59:05 +05:00
parent 37991ddce6
commit a73ff54140
10 changed files with 454 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import json
import re
def fetch_nonce(html_content):
match = re.search(r'"nonce"\s*:\s*"([^"]+)"', html_content)
if not match:
raise ValueError("Nonce не найден на странице.")
return match.group(1)
def fetch_args(html_content):
match = re.search(
r"ObjectManagerList\.add\((\{.*?\})\)\.initLazyLoad", html_content, re.S
)
if not match:
raise ValueError("Данные страниц не найдены на странице.")
pages = json.loads(match.group(1))
args = pages.get("args", [])
return json.loads(args) if isinstance(args, str) else args