user-scanner 1.0.4.2__tar.gz → 1.0.5.0__tar.gz

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.
Files changed (69) hide show
  1. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/PKG-INFO +8 -48
  2. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/README.md +7 -47
  3. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/pyproject.toml +1 -1
  4. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/__main__.py +7 -5
  5. user_scanner-1.0.5.0/user_scanner/community/coderlegion.py +18 -0
  6. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/core/orchestrator.py +58 -9
  7. user_scanner-1.0.5.0/user_scanner/creator/devto.py +17 -0
  8. user_scanner-1.0.5.0/user_scanner/creator/itch_io.py +22 -0
  9. user_scanner-1.0.5.0/user_scanner/creator/kaggle.py +18 -0
  10. user_scanner-1.0.5.0/user_scanner/creator/patreon.py +23 -0
  11. user_scanner-1.0.5.0/user_scanner/dev/codeberg.py +17 -0
  12. user_scanner-1.0.5.0/user_scanner/dev/cratesio.py +24 -0
  13. user_scanner-1.0.5.0/user_scanner/dev/dockerhub.py +22 -0
  14. user_scanner-1.0.5.0/user_scanner/dev/github.py +31 -0
  15. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/dev/gitlab.py +8 -22
  16. user_scanner-1.0.5.0/user_scanner/dev/launchpad.py +24 -0
  17. user_scanner-1.0.5.0/user_scanner/dev/replit.py +17 -0
  18. user_scanner-1.0.5.0/user_scanner/donation/buymeacoffee.py +21 -0
  19. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/gaming/chess_com.py +5 -18
  20. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/gaming/monkeytype.py +5 -18
  21. user_scanner-1.0.5.0/user_scanner/gaming/osu.py +22 -0
  22. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/gaming/roblox.py +3 -17
  23. user_scanner-1.0.5.0/user_scanner/gaming/steam.py +30 -0
  24. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/bluesky.py +6 -19
  25. user_scanner-1.0.5.0/user_scanner/social/instagram.py +27 -0
  26. user_scanner-1.0.5.0/user_scanner/social/mastodon.py +23 -0
  27. user_scanner-1.0.5.0/user_scanner/social/pinterest.py +26 -0
  28. user_scanner-1.0.5.0/user_scanner/social/reddit.py +26 -0
  29. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/snapchat.py +5 -20
  30. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/telegram.py +4 -11
  31. user_scanner-1.0.5.0/user_scanner/social/threads.py +27 -0
  32. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/version.json +1 -1
  33. user_scanner-1.0.4.2/user_scanner/community/coderlegion.py +0 -39
  34. user_scanner-1.0.4.2/user_scanner/creator/devto.py +0 -37
  35. user_scanner-1.0.4.2/user_scanner/creator/itch_io.py +0 -45
  36. user_scanner-1.0.4.2/user_scanner/creator/kaggle.py +0 -37
  37. user_scanner-1.0.4.2/user_scanner/creator/patreon.py +0 -45
  38. user_scanner-1.0.4.2/user_scanner/dev/codeberg.py +0 -37
  39. user_scanner-1.0.4.2/user_scanner/dev/cratesio.py +0 -39
  40. user_scanner-1.0.4.2/user_scanner/dev/dockerhub.py +0 -40
  41. user_scanner-1.0.4.2/user_scanner/dev/github.py +0 -46
  42. user_scanner-1.0.4.2/user_scanner/dev/launchpad.py +0 -39
  43. user_scanner-1.0.4.2/user_scanner/dev/replit.py +0 -37
  44. user_scanner-1.0.4.2/user_scanner/gaming/osu.py +0 -44
  45. user_scanner-1.0.4.2/user_scanner/gaming/steam.py +0 -46
  46. user_scanner-1.0.4.2/user_scanner/social/instagram.py +0 -42
  47. user_scanner-1.0.4.2/user_scanner/social/mastodon.py +0 -45
  48. user_scanner-1.0.4.2/user_scanner/social/pinterest.py +0 -42
  49. user_scanner-1.0.4.2/user_scanner/social/reddit.py +0 -42
  50. user_scanner-1.0.4.2/user_scanner/social/threads.py +0 -42
  51. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/LICENSE +0 -0
  52. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/__init__.py +0 -0
  53. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/cli/__init__.py +0 -0
  54. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/cli/banner.py +0 -0
  55. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/community/__init__.py +0 -0
  56. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/core/__init__.py +0 -0
  57. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/creator/__init__.py +0 -0
  58. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/creator/hashnode.py +0 -0
  59. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/creator/medium.py +0 -0
  60. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/creator/producthunt.py +0 -0
  61. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/dev/__init__.py +0 -0
  62. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/dev/npmjs.py +0 -0
  63. {user_scanner-1.0.4.2/user_scanner/gaming → user_scanner-1.0.5.0/user_scanner/donation}/__init__.py +0 -0
  64. /user_scanner-1.0.4.2/user_scanner/utils/update.py → /user_scanner-1.0.5.0/user_scanner/gaming/__init__.py +0 -0
  65. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/__init__.py +0 -0
  66. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/discord.py +0 -0
  67. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/x.py +0 -0
  68. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/social/youtube.py +0 -0
  69. {user_scanner-1.0.4.2 → user_scanner-1.0.5.0}/user_scanner/utils/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: user-scanner
3
- Version: 1.0.4.2
3
+ Version: 1.0.5.0
4
4
  Summary: Check username availability across multiple popular platforms
5
5
  Keywords: username,checker,availability,social,tech,python,user-scanner
6
6
  Author-email: Kaif <kafcodec@gmail.com>
@@ -15,7 +15,7 @@ Project-URL: Homepage, https://github.com/kaifcodec/user-scanner
15
15
 
16
16
  ![1000136215](https://github.com/user-attachments/assets/49ec8d24-665b-4115-8525-01a8d0ca2ef4)
17
17
  <p align="center">
18
- <img src="https://img.shields.io/badge/Version-1.0.4.2-blueviolet?style=for-the-badge&logo=github" />
18
+ <img src="https://img.shields.io/badge/Version-1.0.5.0-blueviolet?style=for-the-badge&logo=github" />
19
19
  <img src="https://img.shields.io/github/issues/kaifcodec/user-scanner?style=for-the-badge&logo=github" />
20
20
  <img src="https://img.shields.io/badge/Tested%20on-Termux-black?style=for-the-badge&logo=termux" />
21
21
  <img src="https://img.shields.io/badge/Tested%20on-Windows-cyan?style=for-the-badge&logo=Windows" />
@@ -63,53 +63,13 @@ user-scanner -u <username> -m github
63
63
 
64
64
  ```
65
65
  ---
66
- ### Example Output:
66
+ ### Screenshot:
67
+
68
+ - Note*: New modules are constantly getting added so this might have only limited, outdated output:
69
+
70
+ <img width="1008" height="568" alt="1000139959" src="https://github.com/user-attachments/assets/467a4aa0-238d-4110-b9a6-d4b96c244432" />
71
+
67
72
 
68
- - Note*: New modules are constantly getting added so this might have only limited, outdated output:
69
- ```bash
70
- Checking username: johndoe078
71
-
72
- == DEV SITES ==
73
- [✔] Codeberg: Available
74
- [✔] Cratesio: Available
75
- [✔] Dockerhub: Available
76
- [✘] Github: Taken
77
- [✔] Gitlab: Available
78
- [✔] Launchpad: Available
79
- [✔] Npmjs: Available
80
- [✔] Replit: Available
81
-
82
- == SOCIAL SITES ==
83
- [✔] Bluesky: Available
84
- [✔] Discord: Available
85
- [✘] Instagram: Taken
86
- [✔] Mastodon: Available
87
- [✔] Pinterest: Available
88
- [✘] Reddit: Taken
89
- [✔] Snapchat: Available
90
- [✔] Telegram: Available
91
- [✘] Threads: Taken
92
- [✔] X (Twitter): Available
93
- [✔] Youtube: Available
94
-
95
- == CREATOR SITES ==
96
- [✔] Devto: Available
97
- [✔] Hashnode: Available
98
- [✔] Kaggle: Available
99
- [✔] Medium: Available
100
- [✔] Patreon: Available
101
-
102
- == COMMUNITY SITES ==
103
- [✔] Coderlegion: Available
104
-
105
- == GAMING SITES ==
106
- [✔] Chess_com: Available
107
- [✔] Osu: Available
108
- [✔] Roblox: Available
109
- ...
110
- ...
111
- ...
112
- ```
113
73
  ### Contributing:
114
74
 
115
75
  Modules are organized by category:
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![1000136215](https://github.com/user-attachments/assets/49ec8d24-665b-4115-8525-01a8d0ca2ef4)
4
4
  <p align="center">
5
- <img src="https://img.shields.io/badge/Version-1.0.4.2-blueviolet?style=for-the-badge&logo=github" />
5
+ <img src="https://img.shields.io/badge/Version-1.0.5.0-blueviolet?style=for-the-badge&logo=github" />
6
6
  <img src="https://img.shields.io/github/issues/kaifcodec/user-scanner?style=for-the-badge&logo=github" />
7
7
  <img src="https://img.shields.io/badge/Tested%20on-Termux-black?style=for-the-badge&logo=termux" />
8
8
  <img src="https://img.shields.io/badge/Tested%20on-Windows-cyan?style=for-the-badge&logo=Windows" />
@@ -50,53 +50,13 @@ user-scanner -u <username> -m github
50
50
 
51
51
  ```
52
52
  ---
53
- ### Example Output:
53
+ ### Screenshot:
54
+
55
+ - Note*: New modules are constantly getting added so this might have only limited, outdated output:
56
+
57
+ <img width="1008" height="568" alt="1000139959" src="https://github.com/user-attachments/assets/467a4aa0-238d-4110-b9a6-d4b96c244432" />
58
+
54
59
 
55
- - Note*: New modules are constantly getting added so this might have only limited, outdated output:
56
- ```bash
57
- Checking username: johndoe078
58
-
59
- == DEV SITES ==
60
- [✔] Codeberg: Available
61
- [✔] Cratesio: Available
62
- [✔] Dockerhub: Available
63
- [✘] Github: Taken
64
- [✔] Gitlab: Available
65
- [✔] Launchpad: Available
66
- [✔] Npmjs: Available
67
- [✔] Replit: Available
68
-
69
- == SOCIAL SITES ==
70
- [✔] Bluesky: Available
71
- [✔] Discord: Available
72
- [✘] Instagram: Taken
73
- [✔] Mastodon: Available
74
- [✔] Pinterest: Available
75
- [✘] Reddit: Taken
76
- [✔] Snapchat: Available
77
- [✔] Telegram: Available
78
- [✘] Threads: Taken
79
- [✔] X (Twitter): Available
80
- [✔] Youtube: Available
81
-
82
- == CREATOR SITES ==
83
- [✔] Devto: Available
84
- [✔] Hashnode: Available
85
- [✔] Kaggle: Available
86
- [✔] Medium: Available
87
- [✔] Patreon: Available
88
-
89
- == COMMUNITY SITES ==
90
- [✔] Coderlegion: Available
91
-
92
- == GAMING SITES ==
93
- [✔] Chess_com: Available
94
- [✔] Osu: Available
95
- [✔] Roblox: Available
96
- ...
97
- ...
98
- ...
99
- ```
100
60
  ### Contributing:
101
61
 
102
62
  Modules are organized by category:
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "user-scanner"
7
- version = "1.0.4.2"
7
+ version = "1.0.5.0"
8
8
  description = "Check username availability across multiple popular platforms"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -10,17 +10,19 @@ CATEGORY_MAPPING = {
10
10
  "social": "social",
11
11
  "creator": "creator",
12
12
  "community": "community",
13
- "gaming": "gaming"
13
+ "gaming": "gaming",
14
+ "donation": "donation"
14
15
  }
15
16
 
16
17
  def list_modules(category=None):
17
- from user_scanner import dev, social, creator, community, gaming
18
+ from user_scanner import dev, social, creator, community, gaming, donation
18
19
  packages = {
19
20
  "dev": dev,
20
21
  "social": social,
21
22
  "creator": creator,
22
23
  "community": community,
23
- "gaming": gaming
24
+ "gaming": gaming,
25
+ "donation": donation
24
26
  }
25
27
 
26
28
  categories_to_list = [category] if category else packages.keys()
@@ -79,11 +81,11 @@ def main():
79
81
  print_banner()
80
82
 
81
83
 
82
- from user_scanner import dev, social, creator, community, gaming
84
+ from user_scanner import dev, social, creator, community, gaming, donation
83
85
 
84
86
  if args.module:
85
87
  # Single module search across all categories
86
- packages = [dev, social, creator, community, gaming]
88
+ packages = [dev, social, creator, community, gaming, donation]
87
89
  found = False
88
90
  for package in packages:
89
91
  modules = load_modules(package)
@@ -0,0 +1,18 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_coderlegion(user):
4
+ url = f"https://coderlegion.com/user/{user}"
5
+
6
+ return status_validate(url, 404, 200, timeout = 15.0)
7
+
8
+ if __name__ == "__main__":
9
+ user = input ("Username?: ").strip()
10
+ result = validate_coderlegion(user)
11
+
12
+ if result == 1:
13
+ print("Available!")
14
+ elif result == 0:
15
+ print("Unavailable!")
16
+ else:
17
+ print("Error occured!")
18
+
@@ -3,6 +3,9 @@ import pkgutil
3
3
  from colorama import Fore, Style
4
4
  import threading
5
5
 
6
+ import httpx
7
+ from httpx import ConnectError, TimeoutException
8
+
6
9
  lock = threading.Condition()
7
10
  #Basically which thread is the one to print
8
11
  print_queue = 0
@@ -74,18 +77,64 @@ def run_checks_category(package, username, verbose=False):
74
77
  t.join()
75
78
 
76
79
  def run_checks(username):
77
- from user_scanner import dev, social, creator, community, gaming
80
+ from user_scanner import dev, social, creator, community, gaming, donation
78
81
 
79
- categories = [
80
- ("DEV", dev),
81
- ("SOCIAL", social),
82
- ("CREATOR", creator),
83
- ("COMMUNITY", community),
84
- ("GAMING", gaming)
85
- ]
82
+ packages = [dev, social, creator, community, gaming, donation]
86
83
 
87
84
  print(f"\n{Fore.CYAN} Checking username: {username}{Style.RESET_ALL}\n")
88
85
 
89
- for _, package in categories:
86
+ for package in packages:
90
87
  run_checks_category(package, username)
91
88
  print()
89
+
90
+ def make_get_request(url, **kwargs):
91
+ """Simple wrapper to **httpx.get** that predefines headers and timeout"""
92
+ if not "headers" in kwargs:
93
+ kwargs["headers"] = {
94
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
95
+ 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
96
+ 'Accept-Encoding': "gzip, deflate, br",
97
+ 'Accept-Language': "en-US,en;q=0.9",
98
+ 'sec-fetch-dest': "document",
99
+ }
100
+
101
+ if not "timeout" in kwargs:
102
+ kwargs["timeout"] = 5.0
103
+
104
+ return httpx.get(url, **kwargs)
105
+
106
+ def generic_validate(url, func, **kwargs):
107
+ """
108
+ A generic validate function that makes a request and executes the provided function on the response.
109
+ """
110
+ try:
111
+ response = make_get_request(url, **kwargs)
112
+ return func(response)
113
+ except (ConnectError, TimeoutException):
114
+ return 2
115
+ except Exception:
116
+ return 2
117
+
118
+ def status_validate(url, available, taken, **kwargs):
119
+ """
120
+ Function that takes a **url** and **kwargs** for the request and
121
+ checks if the request status matches the availabe or taken.
122
+ **Available** and **Taken** must either be whole numbers or lists of whole numbers.
123
+ """
124
+ def inner(response):
125
+ #Checks if a number is equal or is contained inside
126
+ contains = lambda a,b: (isinstance(a,list) and b in a) or (a == b)
127
+
128
+ status = response.status_code
129
+ available_value = contains(available, status)
130
+ taken_value = contains(taken, status)
131
+
132
+ if available_value and taken_value:
133
+ return 2 # Can't be both available and taken
134
+ elif available_value:
135
+ return 1
136
+ elif taken_value:
137
+ return 0
138
+ return 2
139
+
140
+ return generic_validate(url, inner, **kwargs)
@@ -0,0 +1,17 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_devto(user):
4
+ url = f"https://dev.to/{user}"
5
+
6
+ return status_validate(url, 404, 200, follow_redirects = True)
7
+
8
+ if __name__ == "__main__":
9
+ user = input ("Username?: ").strip()
10
+ result = validate_devto(user)
11
+
12
+ if result == 1:
13
+ print("Available!")
14
+ elif result == 0:
15
+ print("Unavailable!")
16
+ else:
17
+ print("Error occurred!")
@@ -0,0 +1,22 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_itch_io(user):
4
+ """
5
+ Checks if a itch.io username is available.
6
+ Returns: 1 -> available, 0 -> taken, 2 -> error
7
+ """
8
+
9
+ url = f"https://{user}.itch.io"
10
+
11
+ return status_validate(url, 404, 200, follow_redirects = True)
12
+
13
+ if __name__ == "__main__":
14
+ user = input ("Username?: ").strip()
15
+ result = validate_itch_io(user)
16
+
17
+ if result == 1:
18
+ print("Available!")
19
+ elif result == 0:
20
+ print("Unavailable!")
21
+ else:
22
+ print("Error occurred!")
@@ -0,0 +1,18 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_kaggle(user):
4
+ url = f"https://www.kaggle.com/{user}"
5
+
6
+ return status_validate(url, 404, 200, follow_redirects=True)
7
+
8
+
9
+ if __name__ == "__main__":
10
+ user = input ("Username?: ").strip()
11
+ result = validate_kaggle(user)
12
+
13
+ if result == 1:
14
+ print("Available!")
15
+ elif result == 0:
16
+ print("Unavailable!")
17
+ else:
18
+ print("Error occurred!")
@@ -0,0 +1,23 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_patreon(user):
4
+ url = f"https://www.patreon.com/{user}"
5
+
6
+ return status_validate(url, 404, 200, timeout = 15.0, follow_redirects=True)
7
+
8
+ if __name__ == "__main__":
9
+ try:
10
+ import httpx
11
+ except ImportError:
12
+ print("Error: 'httpx' library is not installed.")
13
+ exit()
14
+
15
+ user = input ("Username?: ").strip()
16
+ result = validate_patreon(user)
17
+
18
+ if result == 1:
19
+ print("Available!")
20
+ elif result == 0:
21
+ print("Unavailable!")
22
+ else:
23
+ print("Error occured!")
@@ -0,0 +1,17 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_codeberg(user):
4
+ url = f"https://codeberg.org/{user}"
5
+
6
+ return status_validate(url, 404, 200, follow_redirects = True)
7
+
8
+ if __name__ == "__main__":
9
+ user = input ("Username?: ").strip()
10
+ result = validate_codeberg(user)
11
+
12
+ if result == 1:
13
+ print("Available!")
14
+ elif result == 0:
15
+ print("Unavailable!")
16
+ else:
17
+ print("Error occurred!")
@@ -0,0 +1,24 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_cratesio(user):
4
+ url = f"https://crates.io/api/v1/users/{user}"
5
+
6
+ headers = {
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': "application/json",
9
+ 'Referer': "https://crates.io/",
10
+ 'sec-fetch-mode': "cors",
11
+ }
12
+
13
+ return status_validate(url, 404, 200, headers = headers)
14
+
15
+ if __name__ == "__main__":
16
+ user = input ("Username?: ").strip()
17
+ result = validate_cratesio(user)
18
+
19
+ if result == 1:
20
+ print("Available!")
21
+ elif result == 0:
22
+ print("Unavailable!")
23
+ else:
24
+ print("Error occurred!")
@@ -0,0 +1,22 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_dockerhub(user):
4
+ url = f"https://hub.docker.com/v2/users/{user}/"
5
+
6
+ headers = {
7
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
8
+ 'Accept': "application/json",
9
+ }
10
+
11
+ return status_validate(url, 404, 200, headers = headers)
12
+
13
+ if __name__ == "__main__":
14
+ user = input ("Username?: ").strip()
15
+ result = validate_dockerhub(user)
16
+
17
+ if result == 1:
18
+ print("Available!")
19
+ elif result == 0:
20
+ print("Unavailable!")
21
+ else:
22
+ print("Error occurred!")
@@ -0,0 +1,31 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_github(user):
4
+ url = f"https://github.com/signup_check/username?value={user}"
5
+
6
+ headers = {
7
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
8
+ 'Accept-Encoding': "gzip, deflate, br, zstd",
9
+ 'sec-ch-ua-platform': "\"Linux\"",
10
+ 'sec-ch-ua': "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"",
11
+ 'sec-ch-ua-mobile': "?0",
12
+ 'sec-fetch-site': "same-origin",
13
+ 'sec-fetch-mode': "cors",
14
+ 'sec-fetch-dest': "empty",
15
+ 'referer': "https://github.com/signup?source=form-home-signup&user_email=",
16
+ 'accept-language': "en-US,en;q=0.9",
17
+ 'priority': "u=1, i"
18
+ }
19
+
20
+ return status_validate(url, 200, 422, headers = headers)
21
+
22
+ if __name__ == "__main__":
23
+ user = input ("Username?: ").strip()
24
+ result = validate_github(user)
25
+
26
+ if result == 1:
27
+ print("Available!")
28
+ elif result == 0:
29
+ print("Unavailable!")
30
+ else:
31
+ print("Error occured!")
@@ -1,23 +1,18 @@
1
- import httpx
2
- import json
3
- from httpx import ConnectError, TimeoutException
1
+ from ..core.orchestrator import generic_validate
4
2
 
5
3
  def validate_gitlab(user):
6
4
  url = f"https://gitlab.com/users/{user}/exists"
7
5
 
8
6
  headers = {
9
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
10
- 'Accept': "application/json, text/plain, */*",
11
- 'X-Requested-With': "XMLHttpRequest",
12
- 'Referer': "https://gitlab.com/users/sign_up",
7
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
8
+ 'Accept': "application/json, text/plain, */*",
9
+ 'X-Requested-With': "XMLHttpRequest",
10
+ 'Referer': "https://gitlab.com/users/sign_up",
13
11
  }
14
12
 
15
- try:
16
- response = httpx.get(url, headers=headers, timeout=3.0)
17
-
13
+ def process(response):
18
14
  if response.status_code == 200:
19
15
  data = response.json()
20
-
21
16
  if 'exists' in data:
22
17
  # Corrected: Compare against Python boolean True/False
23
18
  # AVAILABLE (return 1) if "exists": true
@@ -26,18 +21,9 @@ def validate_gitlab(user):
26
21
  # UNAVAILABLE (return 0) if "exists": false
27
22
  elif data['exists'] is True:
28
23
  return 0
29
-
30
- return 2
31
-
32
- else:
33
- return 2
34
-
35
- except (ConnectError, TimeoutException):
36
- return 2
37
- except json.JSONDecodeError:
38
- return 2
39
- except Exception:
40
24
  return 2
25
+
26
+ return generic_validate(url, process, headers = headers)
41
27
 
42
28
  if __name__ == "__main__":
43
29
  user = input ("Username?: ").strip()
@@ -0,0 +1,24 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_launchpad(user):
4
+ url = f"https://launchpad.net/~{user}"
5
+
6
+ headers = {
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",
9
+ 'Accept-Encoding': "gzip, deflate, br, zstd",
10
+ 'Upgrade-Insecure-Requests': "1",
11
+ }
12
+
13
+ return status_validate(url, 404, 200, headers = headers, follow_redirects=True)
14
+
15
+ if __name__ == "__main__":
16
+ user = input ("Username?: ").strip()
17
+ result = validate_launchpad(user)
18
+
19
+ if result == 1:
20
+ print("Available!")
21
+ elif result == 0:
22
+ print("Unavailable!")
23
+ else:
24
+ print("Error occurred!")
@@ -0,0 +1,17 @@
1
+ from ..core.orchestrator import status_validate
2
+
3
+ def validate_replit(user):
4
+ url = f"https://replit.com/@{user}"
5
+
6
+ return status_validate(url, 404, 200, follow_redirects = True)
7
+
8
+ if __name__ == "__main__":
9
+ user = input ("Username?: ").strip()
10
+ result = validate_replit(user)
11
+
12
+ if result == 1:
13
+ print("Available!")
14
+ elif result == 0:
15
+ print("Unavailable!")
16
+ else:
17
+ print("Error occurred!")
@@ -0,0 +1,21 @@
1
+ import httpx
2
+ from httpx import ConnectError, TimeoutException
3
+
4
+ from ..core.orchestrator import status_validate
5
+
6
+ def validate_buymeacoffee(user):
7
+ url = f"https://buymeacoffee.com/{user}"
8
+
9
+ return status_validate(url, 404, 200, follow_redirects = True)
10
+
11
+
12
+ if __name__ == "__main__":
13
+ user = input ("Username?: ").strip()
14
+ result = validate_buymeacoffee(user)
15
+
16
+ if result == 1:
17
+ print("Available!")
18
+ elif result == 0:
19
+ print("Unavailable!")
20
+ else:
21
+ print("Error occurred!")
@@ -1,6 +1,4 @@
1
- import httpx
2
- from httpx import ConnectError, TimeoutException
3
- import json
1
+ from ..core.orchestrator import generic_validate
4
2
 
5
3
  def validate_chess_com(user):
6
4
  url = f"https://www.chess.com/callback/user/valid?username={user}"
@@ -12,11 +10,8 @@ def validate_chess_com(user):
12
10
  'Accept-Language': "en-US,en;q=0.9",
13
11
  }
14
12
 
15
- try:
16
- response = httpx.get(url, headers=headers, timeout = 3.0)
17
- status = response.status_code
18
-
19
- if status == 200:
13
+ def process(response):
14
+ if response.status_code == 200:
20
15
  data = response.json()
21
16
  if data.get('valid') is True:
22
17
  # 'valid': true means the username is NOT taken
@@ -24,18 +19,10 @@ def validate_chess_com(user):
24
19
  elif data.get('valid') is False:
25
20
  # 'valid': false means the username IS taken
26
21
  return 0
27
- else:
28
- return 2
29
- else:
30
- return 2
31
-
32
- except (ConnectError, TimeoutException):
33
- return 2
34
- except json.JSONDecodeError:
35
- return 2
36
- except Exception:
37
22
  return 2
38
23
 
24
+ return generic_validate(url, process, headers = headers)
25
+
39
26
  if __name__ == "__main__":
40
27
  try:
41
28
  import httpx