user-scanner 1.0.5.0__py3-none-any.whl → 1.0.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- user_scanner/__init__.py +0 -1
- user_scanner/__main__.py +73 -49
- user_scanner/cli/banner.py +2 -0
- user_scanner/community/coderlegion.py +15 -14
- user_scanner/core/orchestrator.py +69 -31
- user_scanner/creator/devto.py +13 -11
- user_scanner/creator/hashnode.py +19 -17
- user_scanner/creator/itch_io.py +12 -10
- user_scanner/creator/kaggle.py +12 -11
- user_scanner/creator/medium.py +11 -10
- user_scanner/creator/patreon.py +17 -15
- user_scanner/creator/producthunt.py +16 -14
- user_scanner/dev/codeberg.py +13 -11
- user_scanner/dev/cratesio.py +19 -17
- user_scanner/dev/dockerhub.py +17 -15
- user_scanner/dev/github.py +26 -24
- user_scanner/dev/gitlab.py +14 -12
- user_scanner/dev/launchpad.py +19 -17
- user_scanner/dev/npmjs.py +22 -19
- user_scanner/dev/replit.py +13 -11
- user_scanner/donation/buymeacoffee.py +11 -10
- user_scanner/donation/liberapay.py +36 -0
- user_scanner/gaming/chess_com.py +20 -18
- user_scanner/gaming/minecraft.py +24 -0
- user_scanner/gaming/monkeytype.py +4 -3
- user_scanner/gaming/osu.py +14 -12
- user_scanner/gaming/roblox.py +20 -16
- user_scanner/gaming/steam.py +12 -10
- user_scanner/social/bluesky.py +20 -18
- user_scanner/social/discord.py +12 -13
- user_scanner/social/instagram.py +22 -20
- user_scanner/social/mastodon.py +17 -15
- user_scanner/social/pinterest.py +13 -11
- user_scanner/social/reddit.py +13 -11
- user_scanner/social/snapchat.py +28 -26
- user_scanner/social/telegram.py +13 -11
- user_scanner/social/threads.py +23 -21
- user_scanner/social/x.py +14 -12
- user_scanner/social/youtube.py +37 -34
- user_scanner/utils/update.py +0 -0
- user_scanner/utils/version.py +2 -0
- user_scanner/version.json +1 -1
- {user_scanner-1.0.5.0.dist-info → user_scanner-1.0.7.0.dist-info}/METADATA +24 -7
- user_scanner-1.0.7.0.dist-info/RECORD +55 -0
- user_scanner-1.0.5.0.dist-info/RECORD +0 -52
- {user_scanner-1.0.5.0.dist-info → user_scanner-1.0.7.0.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.5.0.dist-info → user_scanner-1.0.7.0.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.5.0.dist-info → user_scanner-1.0.7.0.dist-info}/licenses/LICENSE +0 -0
user_scanner/gaming/roblox.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_roblox(user):
|
|
4
5
|
"""
|
|
@@ -6,29 +7,32 @@ def validate_roblox(user):
|
|
|
6
7
|
Returns: 1 -> available, 0 -> taken, 2 -> error
|
|
7
8
|
"""
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
# official api
|
|
11
|
+
url = f"https://users.roblox.com/v1/users/search?keyword={user}&limit=10"
|
|
10
12
|
|
|
11
13
|
def process(response):
|
|
12
|
-
search_results = response.json()
|
|
14
|
+
search_results = response.json() # api response
|
|
13
15
|
|
|
14
|
-
if "errors" in search_results:
|
|
16
|
+
if "errors" in search_results: # this usually triggers when timeout or ratelimit
|
|
15
17
|
return 2
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
# iterates through the entries in the search results
|
|
20
|
+
for entry in search_results["data"]:
|
|
18
21
|
# .lower() so casing from the API doesn't matter
|
|
19
|
-
if entry["name"].lower() == user.lower():
|
|
22
|
+
if entry["name"].lower() == user.lower(): # if a username matches the user
|
|
20
23
|
return 0
|
|
21
24
|
return 1
|
|
22
25
|
|
|
23
|
-
return generic_validate(url, process, follow_redirects
|
|
26
|
+
return generic_validate(url, process, follow_redirects=True)
|
|
27
|
+
|
|
24
28
|
|
|
25
29
|
if __name__ == "__main__":
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
user = input("Username?: ").strip()
|
|
31
|
+
result = validate_roblox(user)
|
|
32
|
+
|
|
33
|
+
if result == 1:
|
|
34
|
+
print("Available!")
|
|
35
|
+
elif result == 0:
|
|
36
|
+
print("Unavailable!")
|
|
37
|
+
else:
|
|
38
|
+
print("Error occurred!")
|
user_scanner/gaming/steam.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_steam(user):
|
|
4
5
|
"""
|
|
@@ -18,13 +19,14 @@ def validate_steam(user):
|
|
|
18
19
|
|
|
19
20
|
return generic_validate(url, process)
|
|
20
21
|
|
|
22
|
+
|
|
21
23
|
if __name__ == "__main__":
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
user = input("Username?: ").strip()
|
|
25
|
+
result = validate_steam(user)
|
|
26
|
+
|
|
27
|
+
if result == 1:
|
|
28
|
+
print("Available!")
|
|
29
|
+
elif result == 0:
|
|
30
|
+
print("Unavailable!")
|
|
31
|
+
else:
|
|
32
|
+
print("Error occurred!")
|
user_scanner/social/bluesky.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import re
|
|
2
|
-
from
|
|
2
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
def validate_bluesky(user):
|
|
5
6
|
handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"
|
|
@@ -26,7 +27,7 @@ def validate_bluesky(user):
|
|
|
26
27
|
|
|
27
28
|
if not re.fullmatch(r"^[a-zA-Z0-9\.-]{1,64}$", user):
|
|
28
29
|
return 2
|
|
29
|
-
|
|
30
|
+
|
|
30
31
|
def process(response):
|
|
31
32
|
if response.status_code == 200:
|
|
32
33
|
data = response.json()
|
|
@@ -38,21 +39,22 @@ def validate_bluesky(user):
|
|
|
38
39
|
return 0
|
|
39
40
|
return 2
|
|
40
41
|
|
|
41
|
-
return generic_validate(url, process, headers
|
|
42
|
+
return generic_validate(url, process, headers=headers, params=params, timeout=15.0)
|
|
43
|
+
|
|
42
44
|
|
|
43
45
|
if __name__ == "__main__":
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
try:
|
|
47
|
+
import httpx
|
|
48
|
+
except ImportError:
|
|
49
|
+
print("Error: 'httpx' library is not installed.")
|
|
50
|
+
exit()
|
|
51
|
+
|
|
52
|
+
user = input("Username?: ").strip()
|
|
53
|
+
result = validate_bluesky(user)
|
|
54
|
+
|
|
55
|
+
if result == 1:
|
|
56
|
+
print("Available!")
|
|
57
|
+
elif result == 0:
|
|
58
|
+
print("Unavailable!")
|
|
59
|
+
else:
|
|
60
|
+
print("Error occured!")
|
user_scanner/social/discord.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import httpx
|
|
2
2
|
from httpx import ConnectError, TimeoutException
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
def validate_discord(user):
|
|
5
6
|
url = "https://discord.com/api/v9/unique-username/username-attempt-unauthed"
|
|
6
7
|
|
|
@@ -12,9 +13,9 @@ def validate_discord(user):
|
|
|
12
13
|
"origin": "https://discord.com",
|
|
13
14
|
"referer": "https://discord.com/register"
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
data = {"username": user}
|
|
17
|
-
|
|
18
|
+
|
|
18
19
|
try:
|
|
19
20
|
response = httpx.post(url, headers=headers, json=data, timeout=3.0)
|
|
20
21
|
if response.status_code == 200:
|
|
@@ -29,16 +30,14 @@ def validate_discord(user):
|
|
|
29
30
|
except Exception:
|
|
30
31
|
return 2
|
|
31
32
|
|
|
32
|
-
if __name__ == "__main__":
|
|
33
|
-
user = input ("Username?: ").strip()
|
|
34
|
-
result = validate_discord(user)
|
|
35
|
-
|
|
36
|
-
if result == 1:
|
|
37
|
-
print("Available!")
|
|
38
|
-
elif result == 0:
|
|
39
|
-
print("Unavailable!")
|
|
40
|
-
else:
|
|
41
|
-
print("Error occured!")
|
|
42
|
-
|
|
43
33
|
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
user = input("Username?: ").strip()
|
|
36
|
+
result = validate_discord(user)
|
|
44
37
|
|
|
38
|
+
if result == 1:
|
|
39
|
+
print("Available!")
|
|
40
|
+
elif result == 0:
|
|
41
|
+
print("Unavailable!")
|
|
42
|
+
else:
|
|
43
|
+
print("Error occured!")
|
user_scanner/social/instagram.py
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_instagram(user):
|
|
4
|
-
|
|
5
|
+
url = f"https://www.instagram.com/api/v1/users/web_profile_info/?username={user}"
|
|
6
|
+
|
|
7
|
+
headers = {
|
|
8
|
+
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
|
|
9
|
+
'X-IG-App-ID': "936619743392459",
|
|
10
|
+
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
11
|
+
'Accept-Encoding': "gzip, deflate, br",
|
|
12
|
+
'Accept-Language': "en-US,en;q=0.9",
|
|
13
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
14
|
+
'Referer': f"https://www.instagram.com/{user}/",
|
|
15
|
+
}
|
|
5
16
|
|
|
6
|
-
|
|
7
|
-
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
|
|
8
|
-
'X-IG-App-ID': "936619743392459",
|
|
9
|
-
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
10
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
-
'X-Requested-With': "XMLHttpRequest",
|
|
13
|
-
'Referer': f"https://www.instagram.com/{user}/",
|
|
14
|
-
}
|
|
17
|
+
return status_validate(url, 404, 200, headers=headers)
|
|
15
18
|
|
|
16
|
-
return status_validate(url, 404, 200, headers = headers)
|
|
17
19
|
|
|
18
20
|
if __name__ == "__main__":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
user = input("Username?: ").strip()
|
|
22
|
+
result = validate_instagram(user)
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if result == 1:
|
|
25
|
+
print("Available!")
|
|
26
|
+
elif result == 0:
|
|
27
|
+
print("Unavailable!")
|
|
28
|
+
else:
|
|
29
|
+
print("Error occured!")
|
user_scanner/social/mastodon.py
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_mastodon(user):
|
|
4
5
|
url = f"https://mastodon.social/@{user}"
|
|
5
6
|
|
|
6
|
-
return status_validate(url, 404, 200, follow_redirects
|
|
7
|
+
return status_validate(url, 404, 200, follow_redirects=True)
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
if __name__ == "__main__":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
try:
|
|
12
|
+
import httpx
|
|
13
|
+
except ImportError:
|
|
14
|
+
print("Error: 'httpx' library is not installed.")
|
|
15
|
+
exit()
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
user = input("Username?: ").strip()
|
|
18
|
+
result = validate_mastodon(user)
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
if result == 1:
|
|
21
|
+
print("Available!")
|
|
22
|
+
elif result == 0:
|
|
23
|
+
print("Unavailable!")
|
|
24
|
+
else:
|
|
25
|
+
print("Error occured!")
|
user_scanner/social/pinterest.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_pinterest(user):
|
|
4
5
|
url = f"https://www.pinterest.com/{user}/"
|
|
@@ -10,17 +11,18 @@ def validate_pinterest(user):
|
|
|
10
11
|
else:
|
|
11
12
|
return 0
|
|
12
13
|
else:
|
|
13
|
-
|
|
14
|
+
return 2
|
|
15
|
+
|
|
16
|
+
return generic_validate(url, process, follow_redirects=True)
|
|
14
17
|
|
|
15
|
-
return generic_validate(url, process, follow_redirects = True)
|
|
16
18
|
|
|
17
19
|
if __name__ == "__main__":
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
user = input("Username?: ").strip()
|
|
21
|
+
result = validate_pinterest(user)
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if result == 1:
|
|
24
|
+
print("Available!")
|
|
25
|
+
elif result == 0:
|
|
26
|
+
print("Unavailable!")
|
|
27
|
+
else:
|
|
28
|
+
print("Error occured!")
|
user_scanner/social/reddit.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_reddit(user):
|
|
4
5
|
url = f"https://www.reddit.com/user/{user}/"
|
|
@@ -10,17 +11,18 @@ def validate_reddit(user):
|
|
|
10
11
|
else:
|
|
11
12
|
return 0
|
|
12
13
|
else:
|
|
13
|
-
|
|
14
|
+
return 2
|
|
15
|
+
|
|
16
|
+
return generic_validate(url, process, follow_redirects=True)
|
|
14
17
|
|
|
15
|
-
return generic_validate(url, process, follow_redirects = True)
|
|
16
18
|
|
|
17
19
|
if __name__ == "__main__":
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
user = input("Username?: ").strip()
|
|
21
|
+
result = validate_reddit(user)
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if result == 1:
|
|
24
|
+
print("Available!")
|
|
25
|
+
elif result == 0:
|
|
26
|
+
print("Unavailable!")
|
|
27
|
+
else:
|
|
28
|
+
print("Error occured!")
|
user_scanner/social/snapchat.py
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_snapchat(user):
|
|
4
|
-
|
|
5
|
+
url = f"https://www.snapchat.com/@{user}"
|
|
6
|
+
|
|
7
|
+
headers = {
|
|
8
|
+
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
9
|
+
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
10
|
+
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
11
|
+
'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",
|
|
12
|
+
'sec-ch-ua-mobile': "?1",
|
|
13
|
+
'sec-ch-ua-platform': "\"Android\"",
|
|
14
|
+
'upgrade-insecure-requests': "1",
|
|
15
|
+
'sec-fetch-site': "none",
|
|
16
|
+
'sec-fetch-mode': "navigate",
|
|
17
|
+
'sec-fetch-user': "?1",
|
|
18
|
+
'sec-fetch-dest': "document",
|
|
19
|
+
'accept-language': "en-US,en;q=0.9",
|
|
20
|
+
'priority': "u=0, i"
|
|
21
|
+
}
|
|
5
22
|
|
|
6
|
-
|
|
7
|
-
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
8
|
-
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
9
|
-
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
10
|
-
'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",
|
|
11
|
-
'sec-ch-ua-mobile': "?1",
|
|
12
|
-
'sec-ch-ua-platform': "\"Android\"",
|
|
13
|
-
'upgrade-insecure-requests': "1",
|
|
14
|
-
'sec-fetch-site': "none",
|
|
15
|
-
'sec-fetch-mode': "navigate",
|
|
16
|
-
'sec-fetch-user': "?1",
|
|
17
|
-
'sec-fetch-dest': "document",
|
|
18
|
-
'accept-language': "en-US,en;q=0.9",
|
|
19
|
-
'priority': "u=0, i"
|
|
20
|
-
}
|
|
23
|
+
return status_validate(url, 404, 200, headers=headers, follow_redirects=True)
|
|
21
24
|
|
|
22
|
-
return status_validate(url, 404, 200, headers = headers, follow_redirects = True)
|
|
23
25
|
|
|
24
26
|
if __name__ == "__main__":
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
user = input("Username?: ").strip()
|
|
28
|
+
result = validate_snapchat(user)
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
if result == 1:
|
|
31
|
+
print("Available!")
|
|
32
|
+
elif result == 0:
|
|
33
|
+
print("Unavailable!")
|
|
34
|
+
else:
|
|
35
|
+
print("Error occured!")
|
user_scanner/social/telegram.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import re
|
|
2
|
-
from
|
|
2
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
def validate_telegram(user: str) -> int:
|
|
5
6
|
"""
|
|
@@ -12,16 +13,17 @@ def validate_telegram(user: str) -> int:
|
|
|
12
13
|
if r.status_code == 200:
|
|
13
14
|
return 0 if re.search(r'<div[^>]*class="tgme_page_extra"[^>]*>', r.text) else 1
|
|
14
15
|
return 2
|
|
15
|
-
|
|
16
|
-
return generic_validate(url, process, follow_redirects
|
|
16
|
+
|
|
17
|
+
return generic_validate(url, process, follow_redirects=True)
|
|
18
|
+
|
|
17
19
|
|
|
18
20
|
if __name__ == "__main__":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
user = input("Username?: ").strip()
|
|
22
|
+
result = validate_telegram(user)
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if result == 1:
|
|
25
|
+
print("Available!")
|
|
26
|
+
elif result == 0:
|
|
27
|
+
print("Unavailable!")
|
|
28
|
+
else:
|
|
29
|
+
print("Error occured!")
|
user_scanner/social/threads.py
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
from
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
def validate_instagram(user):
|
|
4
|
-
|
|
5
|
+
url = f"https://www.threads.com/api/v1/users/web_profile_info/?username={user}"
|
|
6
|
+
|
|
7
|
+
headers = {
|
|
8
|
+
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
|
|
9
|
+
'X-IG-App-ID': "936619743392459",
|
|
10
|
+
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
11
|
+
'Accept-Encoding': "gzip, deflate, br",
|
|
12
|
+
'Accept-Language': "en-US,en;q=0.9",
|
|
13
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
14
|
+
'Referer': f"https://www.instagram.com/{user}/",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return status_validate(url, 404, 200, headers=headers)
|
|
5
18
|
|
|
6
|
-
headers = {
|
|
7
|
-
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
|
|
8
|
-
'X-IG-App-ID': "936619743392459",
|
|
9
|
-
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
10
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
-
'X-Requested-With': "XMLHttpRequest",
|
|
13
|
-
'Referer': f"https://www.instagram.com/{user}/",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return status_validate(url, 404, 200, headers = headers)
|
|
17
19
|
|
|
18
20
|
if __name__ == "__main__":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
user = input("Username?: ").strip()
|
|
22
|
+
result = validate_instagram(user)
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if result == 1:
|
|
25
|
+
print("Available!")
|
|
26
|
+
elif result == 0:
|
|
27
|
+
print("Unavailable!")
|
|
28
|
+
else:
|
|
29
|
+
print("Error occured!")
|
user_scanner/social/x.py
CHANGED
|
@@ -3,6 +3,7 @@ import json
|
|
|
3
3
|
from colorama import Fore, Style
|
|
4
4
|
from httpx import ConnectError, TimeoutException
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
def validate_x(user):
|
|
7
8
|
url = "https://api.twitter.com/i/users/username_available.json"
|
|
8
9
|
|
|
@@ -18,13 +19,12 @@ def validate_x(user):
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
try:
|
|
21
|
-
response = httpx.get(url, params=params, headers=headers, timeout
|
|
22
|
+
response = httpx.get(url, params=params, headers=headers, timeout=3.0)
|
|
22
23
|
status = response.status_code
|
|
23
24
|
# print(response.text)
|
|
24
25
|
if status in [401, 403, 429]:
|
|
25
26
|
return 2
|
|
26
27
|
|
|
27
|
-
|
|
28
28
|
elif status == 200:
|
|
29
29
|
data = response.json()
|
|
30
30
|
if data.get('valid') is True:
|
|
@@ -32,7 +32,8 @@ def validate_x(user):
|
|
|
32
32
|
elif data.get('reason') == 'taken':
|
|
33
33
|
return 0
|
|
34
34
|
elif (data.get('reason') == "improper_format" or data.get('reason') == "invalid_username"):
|
|
35
|
-
print(
|
|
35
|
+
print(
|
|
36
|
+
"\n" + " "+f"{Fore.CYAN}X says: {data.get('desc')}{Style.RESET_ALL}")
|
|
36
37
|
return 2
|
|
37
38
|
else:
|
|
38
39
|
return 2
|
|
@@ -42,13 +43,14 @@ def validate_x(user):
|
|
|
42
43
|
except Exception:
|
|
43
44
|
return 2
|
|
44
45
|
|
|
46
|
+
|
|
45
47
|
if __name__ == "__main__":
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
user = input("Username?: ").strip()
|
|
49
|
+
result = validate_x(user)
|
|
50
|
+
|
|
51
|
+
if result == 1:
|
|
52
|
+
print("Available!")
|
|
53
|
+
elif result == 0:
|
|
54
|
+
print("Unavailable!")
|
|
55
|
+
else:
|
|
56
|
+
print("Error occured!")
|
user_scanner/social/youtube.py
CHANGED
|
@@ -1,56 +1,59 @@
|
|
|
1
1
|
import httpx
|
|
2
2
|
from httpx import ConnectError, TimeoutException
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
def validate_youtube(user):
|
|
5
6
|
url = f"https://m.youtube.com/@{user}"
|
|
6
7
|
|
|
7
8
|
headers = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
10
|
+
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
11
|
+
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
12
|
+
'device-memory': "4",
|
|
13
|
+
'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",
|
|
14
|
+
'sec-ch-ua-mobile': "?1",
|
|
15
|
+
'sec-ch-ua-full-version': "\"141.0.7390.111\"",
|
|
16
|
+
'sec-ch-ua-arch': "\"\"",
|
|
17
|
+
'sec-ch-ua-platform': "\"Android\"",
|
|
18
|
+
'sec-ch-ua-platform-version': "\"15.0.0\"",
|
|
19
|
+
'sec-ch-ua-bitness': "\"\"",
|
|
20
|
+
'sec-ch-ua-wow64': "?0",
|
|
21
|
+
'sec-ch-ua-full-version-list': "\"Google Chrome\";v=\"141.0.7390.111\", \"Not?A_Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"141.0.7390.111\"",
|
|
22
|
+
'sec-ch-ua-form-factors': "\"Mobile\"",
|
|
23
|
+
'upgrade-insecure-requests': "1",
|
|
24
|
+
'sec-fetch-site': "none",
|
|
25
|
+
'sec-fetch-mode': "navigate",
|
|
26
|
+
'sec-fetch-user': "?1",
|
|
27
|
+
'sec-fetch-dest': "document",
|
|
28
|
+
'accept-language': "en-US,en;q=0.9",
|
|
29
|
+
'priority': "u=0, i"
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
try:
|
|
32
|
-
response = httpx.get(url, headers=headers,
|
|
33
|
+
response = httpx.get(url, headers=headers,
|
|
34
|
+
follow_redirects=True, timeout=3.0)
|
|
33
35
|
status = response.status_code
|
|
34
36
|
|
|
35
37
|
if status == 200:
|
|
36
|
-
|
|
38
|
+
return 0
|
|
37
39
|
elif status == 404:
|
|
38
|
-
|
|
40
|
+
return 1
|
|
39
41
|
else:
|
|
40
|
-
|
|
42
|
+
return 2
|
|
41
43
|
|
|
42
44
|
except (ConnectError, TimeoutException):
|
|
43
45
|
return 2
|
|
44
46
|
except Exception:
|
|
45
47
|
return 2
|
|
46
48
|
|
|
49
|
+
|
|
47
50
|
if __name__ == "__main__":
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
user = input("Username?: ").strip()
|
|
52
|
+
result = validate_youtube(user)
|
|
53
|
+
|
|
54
|
+
if result == 1:
|
|
55
|
+
print("Available!")
|
|
56
|
+
elif result == 0:
|
|
57
|
+
print("Unavailable!")
|
|
58
|
+
else:
|
|
59
|
+
print("Error occured!")
|
|
File without changes
|