Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions user_scanner/user_scan/finance/advfn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from user_scanner.core.orchestrator import generic_validate, Result

def validate_advfn(user):
url = f"https://uk.advfn.com/forum/profile/{user}"
show_url = url

def process(response):
if "Profile | ADVFN" in response.text:
return Result.taken()

if "ADVFN ERROR - Page Not Found" in response.text:
return Result.available()

return Result.error("Unexpected response body, report it via GitHub issues.")

return generic_validate(url, process, show_url=show_url)
25 changes: 25 additions & 0 deletions user_scanner/user_scan/finance/etoro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from user_scanner.core.orchestrator import generic_validate, Result

def validate_etoro(user):
url = f"https://www.etoro.com/api/logininfo/v1.1/users/{user}"
show_url = f"https://www.etoro.com/people/{user}"

headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36",
"Accept": "application/json",
"Referer": "https://www.etoro.com/"
}

def process(response):
if '"gcid":' in response.text:
return Result.taken()

if '"ErrorCode":"NotFound"' in response.text:
return Result.available()

if response.status_code == 403:
return Result.error("Blocked by Cloudflare protection.")

return Result.error("Unexpected API response format.")

return generic_validate(url, process, headers=headers, show_url=show_url)
17 changes: 17 additions & 0 deletions user_scanner/user_scan/finance/hamaha.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from user_scanner.core.orchestrator import generic_validate, Result

def validate_hamaha(user):
url = f"https://hamaha.net/{user}"
show_url = url

def process(response):
if 'id="profile"' in response.text:
return Result.taken()

if 'content="HAMAHA Биткоин форум. Торговля на бирже - ➨ Обучение Криптовалютам, Биткоин и NYSE "' in response.text:
return Result.available()

return Result.error("Unexpected response body, report it via GitHub issues.")

return generic_validate(url, process, show_url=show_url)

Loading