Skip to content

🕵️‍♂️ (2-in-1) Email & Username OSINT suite featuring native MCP support for deep data extraction just from a single Email/Username. Analyzes 2720+ actively maintained scan vectors (210+ email / 2510+ username) for security research, investigations, and digital footprinting.

feat(user_scan): add 17 modules (#743)

alvaromaltrainc7b3681d63f2
diff --git a/user_scanner/user_scan/creative/flipsnack.py b/user_scanner/user_scan/creative/flipsnack.py
new file mode 100644
index 0000000..7085fe4
--- /dev/null
+++ b/user_scanner/user_scan/creative/flipsnack.py
@@ -0,0 +1,53 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+
+def validate_flipsnack(user: str) -> Result:
+ url = f"https://www.flipsnack.com/{user}/"
+
+ def process(response):
+ if response.status_code == 404:
+ if "This page does not exist" in response.text:
+ return Result.available()
+ return Result.error("Unrecognized Flipsnack not-found response")
+
+ if response.status_code != 200:
+ return Result.error(f"Unexpected response status: {response.status_code}")
+
+ title = re.search(r"<title[^>]*>(.*?)</title>", response.text, re.S)
+ if not title:
+ return Result.error("Flipsnack profile markers were missing")
+
+ page_title = html.unescape(title.group(1)).strip()
+
+ display = re.search(
+ r"(.*),\s*" + re.escape(user) + r"\s*-\s*Flipsnack\s*$",
+ page_title,
+ re.IGNORECASE,
+ )
+ if not display:
+ return Result.error("Flipsnack profile marker did not match target")
+
+ extra = {}
+ media = {}
+ name = display.group(1).strip()
+ if name and name.lower() != user.lower():
+ extra["fullname"] = name
+
+ count = re.search(r"has (\d+) public flipbooks?\b", response.text)
+ if count:
+ extra["flipbooks"] = count.group(1)
+
+ avatar = re.search(
+ r'<meta[^>]*property="og:image"[^>]*content="([^"]+)"',
+ response.text,
+ )
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1)).strip()
+
+ return Result.taken(extra=extra, media=media)
+
+ return generic_validate(url, process, show_url=url, follow_redirects=True)
diff --git a/user_scanner/user_scan/gaming/opgg_lol_br.py b/user_scanner/user_scan/gaming/opgg_lol_br.py
new file mode 100644
index 0000000..22b788a
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_br.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "br"
+
+
+def validate_opgg_lol_br(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/br"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/br/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_eune.py b/user_scanner/user_scan/gaming/opgg_lol_eune.py
new file mode 100644
index 0000000..1ff7929
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_eune.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "eune"
+
+
+def validate_opgg_lol_eune(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/eune"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/eune/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_euw.py b/user_scanner/user_scan/gaming/opgg_lol_euw.py
new file mode 100644
index 0000000..b452795
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_euw.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "euw"
+
+
+def validate_opgg_lol_euw(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/euw"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/euw/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_jp.py b/user_scanner/user_scan/gaming/opgg_lol_jp.py
new file mode 100644
index 0000000..86224dd
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_jp.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "jp"
+
+
+def validate_opgg_lol_jp(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/jp"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/jp/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_kr.py b/user_scanner/user_scan/gaming/opgg_lol_kr.py
new file mode 100644
index 0000000..4aa2dbd
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_kr.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "kr"
+
+
+def validate_opgg_lol_kr(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/kr"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/kr/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_lan.py b/user_scanner/user_scan/gaming/opgg_lol_lan.py
new file mode 100644
index 0000000..12818fa
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_lan.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "lan"
+
+
+def validate_opgg_lol_lan(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/lan"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/lan/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_las.py b/user_scanner/user_scan/gaming/opgg_lol_las.py
new file mode 100644
index 0000000..621c09e
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_las.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "las"
+
+
+def validate_opgg_lol_las(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/las"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/las/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_me.py b/user_scanner/user_scan/gaming/opgg_lol_me.py
new file mode 100644
index 0000000..11a6d75
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_me.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "me"
+
+
+def validate_opgg_lol_me(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/me"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/me/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_na.py b/user_scanner/user_scan/gaming/opgg_lol_na.py
new file mode 100644
index 0000000..32e593c
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_na.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "na"
+
+
+def validate_opgg_lol_na(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/na"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/na/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_oce.py b/user_scanner/user_scan/gaming/opgg_lol_oce.py
new file mode 100644
index 0000000..dbbc8a1
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_oce.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "oce"
+
+
+def validate_opgg_lol_oce(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/oce"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/oce/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_ru.py b/user_scanner/user_scan/gaming/opgg_lol_ru.py
new file mode 100644
index 0000000..847cdb0
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_ru.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "ru"
+
+
+def validate_opgg_lol_ru(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/ru"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/ru/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_sea.py b/user_scanner/user_scan/gaming/opgg_lol_sea.py
new file mode 100644
index 0000000..95471bb
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_sea.py
@@ -0,0 +1,48 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "sea"
+
+
+def validate_opgg_lol_sea(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/sea"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search('href="/lol/summoners/sea/([^"]*)"', page)
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_tr.py b/user_scanner/user_scan/gaming/opgg_lol_tr.py
new file mode 100644
index 0000000..662867b
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_tr.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "tr"
+
+
+def validate_opgg_lol_tr(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/tr"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/tr/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_tw.py b/user_scanner/user_scan/gaming/opgg_lol_tw.py
new file mode 100644
index 0000000..4b686ba
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_tw.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "tw"
+
+
+def validate_opgg_lol_tw(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/tw"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/tw/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/gaming/opgg_lol_vn.py b/user_scanner/user_scan/gaming/opgg_lol_vn.py
new file mode 100644
index 0000000..9ed2a3f
--- /dev/null
+++ b/user_scanner/user_scan/gaming/opgg_lol_vn.py
@@ -0,0 +1,50 @@
+import html
+import re
+
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+REGION = "vn"
+
+
+def validate_opgg_lol_vn(user: str) -> Result:
+ url = "https://op.gg/lol/summoners/search"
+ show_url = "https://op.gg/lol/summoners/vn"
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error(
+ f"Unexpected response status: {response.status_code}", url=show_url
+ )
+
+ page = response.text
+ anchor = re.search(
+ 'href="/lol/summoners/vn/([^"]*)"', page
+ )
+
+ if anchor:
+ card = page[anchor.start():anchor.start() + 2000]
+ extra = {}
+ media = {}
+
+ riot_id = re.search(r'alt="([^"]+)"', card)
+ if riot_id:
+ extra["riot_id"] = riot_id.group(1)
+
+ level = re.search(r'text-white">(\d+)</div>', card)
+ if level:
+ extra["level"] = level.group(1)
+
+ avatar = re.search(r'src="([^"]+)"', card)
+ if avatar:
+ media["avatar"] = html.unescape(avatar.group(1))
+
+ profile_url = f"https://op.gg/lol/summoners/{REGION}/{anchor.group(1)}"
+ return Result.taken(extra=extra, media=media, url=profile_url)
+
+ if ">No search results for" in page or "found in other regions.</h1>" in page:
+ return Result.available(url=show_url)
+
+ return Result.error("OP.GG answered no readable search page", url=show_url)
+
+ return generic_validate(url, process, params={"q": user, "region": REGION})
diff --git a/user_scanner/user_scan/learning/quizlet.py b/user_scanner/user_scan/learning/quizlet.py
new file mode 100644
index 0000000..1ddb21c
--- /dev/null
+++ b/user_scanner/user_scan/learning/quizlet.py
@@ -0,0 +1,78 @@
+from user_scanner.core.impersonate import impersonate_validate
+from user_scanner.core.nextjs import parse_next_pages_data
+from user_scanner.core.result import Result, Status
+
+
+def validate_quizlet(user: str) -> Result:
+ url = f"https://quizlet.com/user/{user}/sets"
+
+ def process(response):
+ html = response.text
+
+ if "Captcha Challenge" in html or "has been denied" in html or "_pxVid" in html:
+ return Result.error("Blocked by Quizlet bot challenge")
+
+ if response.status_code == 404:
+ data = parse_next_pages_data(html) or {}
+ page_props = data.get("props", {}).get("pageProps", {})
+ if data.get("page") == "/_error" and page_props.get("statusCode") == 404:
+ return Result.available()
+ return Result.error("Unrecognized Quizlet not-found response")
+
+ if response.status_code != 200:
+ return Result.error(f"Unexpected response status: {response.status_code}")
+
+ data = parse_next_pages_data(html)
+ if not data:
+ return Result.error("Quizlet profile payload was missing")
+
+ page_props = data.get("props", {}).get("pageProps", {})
+ account = page_props.get("user")
+ if not isinstance(account, dict):
+ return Result.error("Quizlet profile gave no user record")
+
+ if str(account.get("username", "")).lower() != user.lower():
+ return Result.error("Quizlet profile marker did not match target")
+
+ extra = {}
+ media = {}
+
+ fullname = " ".join(
+ part for part in (account.get("firstName"), account.get("lastName")) if part
+ ).strip()
+ if fullname:
+ extra["fullname"] = fullname
+ if account.get("timeZone"):
+ extra["time_zone"] = account["timeZone"]
+
+ counts = {
+ "uploads": page_props.get("numCreated"),
+ "classes": page_props.get("numClasses"),
+ "folders": page_props.get("numFolders"),
+ }
+ for key, value in counts.items():
+ if isinstance(value, int):
+ extra[key] = value
+
+ if isinstance(page_props.get("isTopCreator"), bool) and page_props["isTopCreator"]:
+ extra["top_creator"] = True
+
+ if account.get("_imageUrl"):
+ media["avatar"] = str(account["_imageUrl"])
+
+ return Result.taken(extra=extra, media=media)
+
+ return _fallback_profiles(url, process)
+
+
+def _fallback_profiles(url: str, process) -> Result:
+ profiles = ("firefox", "safari")
+ for index, profile in enumerate(profiles):
+ result = impersonate_validate(url, process, show_url=url, impersonate=profile)
+ blocked = result.status is Status.ERROR and any(
+ word in result.get_reason().lower()
+ for word in ("challenge", "denied")
+ )
+ if not blocked or index == len(profiles) - 1:
+ return result
+ return result