user-scanner 1.0.0.7__tar.gz → 1.0.0.8__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 (37) hide show
  1. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/PKG-INFO +1 -1
  2. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/pyproject.toml +1 -1
  3. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/__main__.py +15 -9
  4. user_scanner-1.0.0.8/user_scanner/gaming/__init__.py +0 -0
  5. user_scanner-1.0.0.8/user_scanner/gaming/chess_com.py +54 -0
  6. user_scanner-1.0.0.8/user_scanner/social/mastodon.py +45 -0
  7. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/LICENSE +0 -0
  8. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/README.md +0 -0
  9. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/__init__.py +0 -0
  10. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/community/__init__.py +0 -0
  11. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/community/coderlegion.py +0 -0
  12. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/core/__init__.py +0 -0
  13. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/core/orchestrator.py +0 -0
  14. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/__init__.py +0 -0
  15. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/devto.py +0 -0
  16. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/hashnode.py +0 -0
  17. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/kaggle.py +0 -0
  18. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/medium.py +0 -0
  19. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/creator/patreon.py +0 -0
  20. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/__init__.py +0 -0
  21. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/codeberg.py +0 -0
  22. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/cratesio.py +0 -0
  23. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/dockerhub.py +0 -0
  24. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/github.py +0 -0
  25. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/gitlab.py +0 -0
  26. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/launchpad.py +0 -0
  27. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/npmjs.py +0 -0
  28. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/dev/replit.py +0 -0
  29. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/__init__.py +0 -0
  30. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/bluesky.py +0 -0
  31. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/instagram.py +0 -0
  32. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/pinterest.py +0 -0
  33. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/reddit.py +0 -0
  34. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/snapchat.py +0 -0
  35. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/threads.py +0 -0
  36. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/user_scanner/social/x.py +0 -0
  37. {user_scanner-1.0.0.7 → user_scanner-1.0.0.8}/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.7
3
+ Version: 1.0.0.8
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.7"
7
+ version = "1.0.0.8"
8
8
  description = "Check username availability across multiple popular platforms"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -7,16 +7,18 @@ CATEGORY_MAPPING = {
7
7
  "dev": "dev",
8
8
  "social": "social",
9
9
  "creator": "creator",
10
- "community": "community"
10
+ "community": "community",
11
+ "gaming": "gaming"
11
12
  }
12
13
 
13
14
  def list_modules(category=None):
14
- from user_scanner import dev, social, creator, community
15
+ from user_scanner import dev, social, creator, community, gaming
15
16
  packages = {
16
17
  "dev": dev,
17
18
  "social": social,
18
19
  "creator": creator,
19
- "community": community
20
+ "community": community,
21
+ "gaming": gaming
20
22
  }
21
23
 
22
24
  categories_to_list = [category] if category else packages.keys()
@@ -60,17 +62,21 @@ def main():
60
62
  if not args.username:
61
63
  print(Fore.RED + "[!] Please provide a username with -u or --username." + Style.RESET_ALL)
62
64
  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)
65
- if re.search(r"[^a-zA-Z0-9\.-]", args.username):
66
- print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. Bluesky will throw error. (Supported: only hyphens and digits)" + Style.RESET_ALL +"\n")
67
65
 
66
+ # Special username checks before run
67
+ if (args.module == "x" or args.category == "social"):
68
+ if re.search(r"[^a-zA-Z0-9._-]", args.username):
69
+ print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. X (Twitter) doesn't support these." + Style.RESET_ALL)
70
+ if (args.module == "bluesky" or args.category == "social"):
71
+ if re.search(r"[^a-zA-Z0-9\.-]", args.username):
72
+ print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. Bluesky will throw error. (Supported: only hyphens and digits)" + Style.RESET_ALL +"\n")
68
73
 
69
- from user_scanner import dev, social, creator, community
74
+
75
+ from user_scanner import dev, social, creator, community, gaming
70
76
 
71
77
  if args.module:
72
78
  # Single module search across all categories
73
- packages = [dev, social, creator, community]
79
+ packages = [dev, social, creator, community, gaming]
74
80
  found = False
75
81
  for package in packages:
76
82
  modules = load_modules(package)
File without changes
@@ -0,0 +1,54 @@
1
+ import httpx
2
+ from httpx import ConnectError, TimeoutException
3
+ import json
4
+
5
+ def validate_chess_com(user):
6
+ url = f"https://www.chess.com/callback/user/valid?username={user}"
7
+
8
+ headers = {
9
+ '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",
10
+ 'Accept': "application/json, text/plain, */*",
11
+ 'Accept-Encoding': "gzip, deflate, br",
12
+ 'Accept-Language': "en-US,en;q=0.9",
13
+ }
14
+
15
+ try:
16
+ response = httpx.get(url, headers=headers, timeout = 3.0)
17
+ status = response.status_code
18
+
19
+ if status == 200:
20
+ data = response.json()
21
+ if data.get('valid') is True:
22
+ # 'valid': true means the username is NOT taken
23
+ return 1
24
+ elif data.get('valid') is False:
25
+ # 'valid': false means the username IS taken
26
+ 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
+ return 2
38
+
39
+ if __name__ == "__main__":
40
+ try:
41
+ import httpx
42
+ except ImportError:
43
+ print("Error: 'httpx' library is not installed.")
44
+ exit()
45
+
46
+ user = input ("Username?: ").strip()
47
+ result = validate_chess_com(user)
48
+
49
+ if result == 1:
50
+ print("Available!")
51
+ elif result == 0:
52
+ print("Unavailable!")
53
+ else:
54
+ print("Error occured!")
@@ -0,0 +1,45 @@
1
+ import httpx
2
+ from httpx import ConnectError, TimeoutException
3
+
4
+ def validate_mastodon(user):
5
+ url = f"https://mastodon.social/@{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
+ '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",
11
+ 'Accept-Language': "en-US,en;q=0.9",
12
+ }
13
+
14
+ try:
15
+ response = httpx.get(url, headers=headers, timeout = 3.0, follow_redirects=True)
16
+ status = response.status_code
17
+
18
+ if status == 200:
19
+ return 0
20
+ elif status == 404:
21
+ return 1
22
+ else:
23
+ return 2
24
+
25
+ except (ConnectError, TimeoutException):
26
+ return 2
27
+ except Exception:
28
+ return 2
29
+
30
+ if __name__ == "__main__":
31
+ try:
32
+ import httpx
33
+ except ImportError:
34
+ print("Error: 'httpx' library is not installed.")
35
+ exit()
36
+
37
+ user = input ("Username?: ").strip()
38
+ result = validate_mastodon(user)
39
+
40
+ if result == 1:
41
+ print("Available!")
42
+ elif result == 0:
43
+ print("Unavailable!")
44
+ else:
45
+ print("Error occured!")
File without changes
File without changes