Remove project OAuth hardcodes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user