Skip to content

Commit 0cc9ca1

Browse files
Merge pull request #260 from kaifcodec/add/user-osint-modules
add: create new category `political/` and add 4 new modules to it
2 parents d62e8fc + 5a67d6c commit 0cc9ca1

5 files changed

Lines changed: 61 additions & 0 deletions

File tree

user_scanner/user_scan/political/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from user_scanner.core.orchestrator import status_validate
2+
3+
4+
def validate_americanthinker(user):
5+
url = f"https://www.americanthinker.com/author/{user}/"
6+
show_url = url
7+
8+
return status_validate(url, 404, 200, show_url=show_url)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from user_scanner.core.orchestrator import generic_validate, Result
2+
3+
4+
def validate_bitchute(user):
5+
url = "https://api.bitchute.com/api/beta/channel"
6+
show_url = f"https://www.bitchute.com/channel/{user}/"
7+
payload = {"channel_id": user}
8+
headers = {"Content-Type": "application/json"}
9+
10+
def process(response):
11+
if '"channel_id":' in response.text:
12+
return Result.taken()
13+
14+
if '"errors":' in response.text:
15+
return Result.available()
16+
17+
return Result.error("Unexpected response body, report it via GitHub issues.")
18+
19+
return generic_validate(url, process, method="post", json=payload, headers=headers, show_url=show_url)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from user_scanner.core.orchestrator import generic_validate, Result
2+
3+
4+
def validate_naturalnews(user):
5+
url = f"https://naturalnews.com/author/{user}/"
6+
show_url = url
7+
8+
def process(response):
9+
if '<div class="VideoPosts">' in response.text:
10+
return Result.taken()
11+
12+
if "The page you are looking for cannot be found" in response.text:
13+
return Result.available()
14+
15+
return Result.error("Unexpected response body, report it via GitHub issues.")
16+
17+
return generic_validate(url, process, show_url=show_url)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from user_scanner.core.orchestrator import generic_validate, Result
2+
3+
4+
def validate_newamerica(user):
5+
url = f"https://www.newamerica.org/our-people/{user}/"
6+
show_url = url
7+
8+
def process(response):
9+
if f'href="http://newamerica.org/our-people/{user}/"' in response.text:
10+
return Result.taken()
11+
12+
if "Page not found" in response.text:
13+
return Result.available()
14+
15+
return Result.error(f"{response.text}Unexpected response body, report it via GitHub issues.")
16+
17+
return generic_validate(url, process, show_url=show_url)

0 commit comments

Comments
 (0)