File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed
user_scanner/user_scan/finance Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ from user_scanner .core .orchestrator import generic_validate , Result
2+
3+ def validate_advfn (user ):
4+ url = f"https://uk.advfn.com/forum/profile/{ user } "
5+ show_url = url
6+
7+ def process (response ):
8+ if "Profile | ADVFN" in response .text :
9+ return Result .taken ()
10+
11+ if "ADVFN ERROR - Page Not Found" in response .text :
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 )
Original file line number Diff line number Diff line change 1+ from user_scanner .core .orchestrator import generic_validate , Result
2+
3+ def validate_etoro (user ):
4+ url = f"https://www.etoro.com/api/logininfo/v1.1/users/{ user } "
5+ show_url = f"https://www.etoro.com/people/{ user } "
6+
7+ headers = {
8+ "User-Agent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36" ,
9+ "Accept" : "application/json" ,
10+ "Referer" : "https://www.etoro.com/"
11+ }
12+
13+ def process (response ):
14+ if '"gcid":' in response .text :
15+ return Result .taken ()
16+
17+ if '"ErrorCode":"NotFound"' in response .text :
18+ return Result .available ()
19+
20+ if response .status_code == 403 :
21+ return Result .error ("Blocked by Cloudflare protection." )
22+
23+ return Result .error ("Unexpected API response format." )
24+
25+ return generic_validate (url , process , headers = headers , show_url = show_url )
Original file line number Diff line number Diff line change 1+ from user_scanner .core .orchestrator import generic_validate , Result
2+
3+ def validate_hamaha (user ):
4+ url = f"https://hamaha.net/{ user } "
5+ show_url = url
6+
7+ def process (response ):
8+ if 'id="profile"' in response .text :
9+ return Result .taken ()
10+
11+ if 'content="HAMAHA Биткоин форум. Торговля на бирже - ➨ Обучение Криптовалютам, Биткоин и NYSE "' in response .text :
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 )
17+
You can’t perform that action at this time.
0 commit comments