user-scanner 1.0.0.1__tar.gz → 1.0.0.3__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 (31) hide show
  1. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/PKG-INFO +1 -1
  2. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/pyproject.toml +1 -1
  3. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/__main__.py +3 -0
  4. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/core/orchestrator.py +1 -6
  5. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/x.py +4 -3
  6. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/LICENSE +0 -0
  7. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/README.md +0 -0
  8. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/__init__.py +0 -0
  9. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/community/__init__.py +0 -0
  10. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/core/__init__.py +0 -0
  11. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/creator/__init__.py +0 -0
  12. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/creator/devto.py +0 -0
  13. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/creator/hashnode.py +0 -0
  14. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/creator/kaggle.py +0 -0
  15. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/creator/medium.py +0 -0
  16. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/__init__.py +0 -0
  17. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/codeberg.py +0 -0
  18. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/cratesio.py +0 -0
  19. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/dockerhub.py +0 -0
  20. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/github.py +0 -0
  21. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/gitlab.py +0 -0
  22. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/launchpad.py +0 -0
  23. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/npmjs.py +0 -0
  24. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/dev/replit.py +0 -0
  25. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/__init__.py +0 -0
  26. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/instagram.py +0 -0
  27. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/pinterest.py +0 -0
  28. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/reddit.py +0 -0
  29. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/snapchat.py +0 -0
  30. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/threads.py +0 -0
  31. {user_scanner-1.0.0.1 → user_scanner-1.0.0.3}/user_scanner/social/youtube.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: user-scanner
3
- Version: 1.0.0.1
3
+ Version: 1.0.0.3
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>
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "user-scanner"
7
- version = "1.0.0.1"
7
+ version = "1.0.0.3"
8
8
  description = "Check username availability across multiple popular platforms"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -1,4 +1,5 @@
1
1
  import argparse
2
+ import re
2
3
  from user_scanner.core.orchestrator import run_checks, load_modules
3
4
  from colorama import Fore, Style
4
5
 
@@ -59,6 +60,8 @@ def main():
59
60
  if not args.username:
60
61
  print(Fore.RED + "[!] Please provide a username with -u or --username." + Style.RESET_ALL)
61
62
  return
63
+ if re.search(r"[^a-zA-Z0-9._-]", args.username):
64
+ print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. X (Twitter) doesn't support these." + Style.RESET_ALL)
62
65
 
63
66
  from user_scanner import dev, social, creator, community
64
67
 
@@ -14,9 +14,7 @@ def load_modules(package):
14
14
  return modules
15
15
 
16
16
  def run_module_single(module, username):
17
- """
18
- Run a single module's validate_ function on the given username.
19
- """
17
+
20
18
  func = next((getattr(module, f) for f in dir(module)
21
19
  if f.startswith("validate_") and callable(getattr(module, f))), None)
22
20
  site_name = module.__name__.split('.')[-1].capitalize()
@@ -38,9 +36,6 @@ def run_module_single(module, username):
38
36
  print(f" {Fore.YELLOW}[!] {site_name} has no validate_ function{Style.RESET_ALL}")
39
37
 
40
38
  def run_checks_category(package, username, verbose=False):
41
- """
42
- Run all modules in a given package (category) on the username.
43
- """
44
39
  modules = load_modules(package)
45
40
  category_name = package.__name__.split('.')[-1].capitalize()
46
41
  print(f"{Fore.MAGENTA}== {category_name} SITES =={Style.RESET_ALL}")
@@ -19,18 +19,19 @@ def validate_x(user):
19
19
  try:
20
20
  response = httpx.get(url, params=params, headers=headers, timeout = 3.0)
21
21
  status = response.status_code
22
- print(status)
23
22
  if status in [401, 403, 429]:
24
23
  return 2
25
24
 
26
-
25
+
27
26
  elif status == 200:
28
27
  data = response.json()
29
-
30
28
  if data.get('valid') is True:
31
29
  return 1
32
30
  elif data.get('reason') == 'taken':
33
31
  return 0
32
+ elif data.get('reason') == "improper_format":
33
+ print(data.get('desc'))
34
+ return 2
34
35
  else:
35
36
  return 2
36
37
 
File without changes
File without changes