Remove project OAuth hardcodes

This commit is contained in:
Your Name
2026-08-03 17:23:51 +05:00
parent cf12aa0df8
commit f2effe002d
6 changed files with 118 additions and 16 deletions
+4 -2
View File
@@ -192,8 +192,10 @@ def normalize_vk_source(value: str) -> str:
raw = str(value or "").strip()
if not raw:
return ""
if "vk.com" in raw:
raw = raw.split("vk.com", 1)[1]
for host in ("vk.com", "vk.ru", "m.vk.com"):
if host in raw:
raw = raw.split(host, 1)[1]
break
raw = raw.lstrip("/")
raw = raw.split("?", 1)[0].split("#", 1)[0].strip()
raw = re.sub(r"^(club|public)", "", raw, flags=re.IGNORECASE)