Skip to content

Commit db1ef74

Browse files
committed
add: 6 new user_scan modules with new category finance with (6-4) modules there and 1 in dev
1 parent 7558814 commit db1ef74

7 files changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from user_scanner.core.orchestrator import generic_validate, Result
2+
3+
def validate_atcoder(user):
4+
url = f"https://atcoder.jp/api/users/exists/?userScreenName={user}"
5+
show_url = "https://atcoder.jp"
6+
7+
def process(response):
8+
if response.status_code == 200:
9+
if response.text.strip().lower() == "true":
10+
return Result.taken()
11+
if response.text.strip().lower() == "false":
12+
return Result.available()
13+
14+
return Result.error("Unexpected response body, report it via GitHub issues.")
15+
16+
return generic_validate(url, process, show_url=show_url)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
def validate_donation_alerts(user):
4+
url = f"https://www.donationalerts.com/api/v1/user/{user}/donationpagesettings"
5+
show_url = "https://www.donationalerts.com"
6+
7+
return status_validate(url, 202, 200, show_url=show_url)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
def validate_donatello(user):
4+
url = f"https://donatello.to/{user}"
5+
show_url = "https://donatello.to"
6+
7+
return status_validate(url, 404, 200, show_url=show_url)

user_scanner/user_scan/finance/__init__.py

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
def validate_cropty(user):
4+
url = f"https://api.cropty.io/v1/auth/{user}"
5+
show_url = "https://www.cropty.io"
6+
7+
return status_validate(url, 404, 200, show_url=show_url)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
def validate_destream(user):
4+
url = f"https://api.destream.net/siteapi/v2/live/details/{user}"
5+
show_url = "https://destream.net"
6+
7+
return status_validate(url, 404, 200, show_url=show_url)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
def validate_audiojungle(user):
4+
url = f"https://audiojungle.net/user/{user}"
5+
show_url = "https://audiojungle.net"
6+
7+
return status_validate(url, 404, 200, show_url=show_url)

0 commit comments

Comments
 (0)