user-scanner 1.0.0.5__tar.gz → 1.0.0.6__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 (33) hide show
  1. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/PKG-INFO +1 -1
  2. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/pyproject.toml +1 -1
  3. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/__main__.py +3 -0
  4. user_scanner-1.0.0.6/user_scanner/social/bluesky.py +71 -0
  5. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/instagram.py +2 -2
  6. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/x.py +4 -2
  7. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/LICENSE +0 -0
  8. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/README.md +0 -0
  9. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/__init__.py +0 -0
  10. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/community/__init__.py +0 -0
  11. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/community/coderlegion.py +0 -0
  12. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/core/__init__.py +0 -0
  13. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/core/orchestrator.py +0 -0
  14. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/creator/__init__.py +0 -0
  15. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/creator/devto.py +0 -0
  16. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/creator/hashnode.py +0 -0
  17. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/creator/kaggle.py +0 -0
  18. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/creator/medium.py +0 -0
  19. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/__init__.py +0 -0
  20. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/codeberg.py +0 -0
  21. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/cratesio.py +0 -0
  22. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/dockerhub.py +0 -0
  23. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/github.py +0 -0
  24. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/gitlab.py +0 -0
  25. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/launchpad.py +0 -0
  26. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/npmjs.py +0 -0
  27. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/dev/replit.py +0 -0
  28. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/__init__.py +0 -0
  29. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/pinterest.py +0 -0
  30. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/reddit.py +0 -0
  31. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/snapchat.py +0 -0
  32. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/user_scanner/social/threads.py +0 -0
  33. {user_scanner-1.0.0.5 → user_scanner-1.0.0.6}/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.5
3
+ Version: 1.0.0.6
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.5"
7
+ version = "1.0.0.6"
8
8
  description = "Check username availability across multiple popular platforms"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
@@ -62,6 +62,9 @@ def main():
62
62
  return
63
63
  if re.search(r"[^a-zA-Z0-9._-]", args.username):
64
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
68
 
66
69
  from user_scanner import dev, social, creator, community
67
70
 
@@ -0,0 +1,71 @@
1
+ import httpx
2
+ from httpx import ConnectError, TimeoutException
3
+ import re
4
+ import json
5
+
6
+ def validate_bluesky(user):
7
+ handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"
8
+ url = "https://bsky.social/xrpc/com.atproto.temp.checkHandleAvailability"
9
+
10
+ headers = {
11
+ 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
12
+ 'Accept-Encoding': "gzip",
13
+ 'atproto-accept-labelers': "did:plc:ar7c4by46qjdydhdevvrndac;redact",
14
+ 'sec-ch-ua-platform': "\"Android\"",
15
+ 'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",
16
+ 'sec-ch-ua-mobile': "?1",
17
+ 'origin': "https://bsky.app",
18
+ 'sec-fetch-site': "cross-site",
19
+ 'sec-fetch-mode': "cors",
20
+ 'sec-fetch-dest': "empty",
21
+ 'referer': "https://bsky.app/",
22
+ 'accept-language': "en-US,en;q=0.9",
23
+ }
24
+
25
+ params = {
26
+ 'handle': handle,
27
+ }
28
+
29
+ if not re.fullmatch(r"^[a-zA-Z0-9\.-]{1,64}$", user):
30
+ return 2
31
+
32
+ try:
33
+ response = httpx.get(url, headers=headers, params=params, timeout = 15.0)
34
+ status = response.status_code
35
+
36
+ if status == 200:
37
+ data = response.json()
38
+ result_type = data.get('result', {}).get('$type')
39
+
40
+ if result_type == "com.atproto.temp.checkHandleAvailability#resultAvailable":
41
+ return 1
42
+ elif result_type == "com.atproto.temp.checkHandleAvailability#resultUnavailable":
43
+ return 0
44
+ else:
45
+ return 2
46
+ else:
47
+ return 2
48
+
49
+ except (ConnectError, TimeoutException):
50
+ return 2
51
+ except json.JSONDecodeError:
52
+ return 2
53
+ except Exception:
54
+ return 2
55
+
56
+ if __name__ == "__main__":
57
+ try:
58
+ import httpx
59
+ except ImportError:
60
+ print("Error: 'httpx' library is not installed.")
61
+ exit()
62
+
63
+ user = input ("Username?: ").strip()
64
+ result = validate_bluesky(user)
65
+
66
+ if result == 1:
67
+ print("Available!")
68
+ elif result == 0:
69
+ print("Unavailable!")
70
+ else:
71
+ print("Error occured!")
@@ -13,9 +13,9 @@ def validate_instagram(user):
13
13
  'X-Requested-With': "XMLHttpRequest",
14
14
  'Referer': f"https://www.instagram.com/{user}/",
15
15
  }
16
-
16
+
17
17
  try:
18
- response = httpx.get(url, headers=headers, timeout = 15.0)
18
+ response = httpx.get(url, headers=headers, timeout = 3.0)
19
19
  status = response.status_code
20
20
 
21
21
  if status == 200:
@@ -1,5 +1,6 @@
1
1
  import httpx
2
2
  import json
3
+ from colorama import Fore, Style
3
4
  from httpx import ConnectError, TimeoutException
4
5
 
5
6
  def validate_x(user):
@@ -19,6 +20,7 @@ def validate_x(user):
19
20
  try:
20
21
  response = httpx.get(url, params=params, headers=headers, timeout = 3.0)
21
22
  status = response.status_code
23
+ # print(response.text)
22
24
  if status in [401, 403, 429]:
23
25
  return 2
24
26
 
@@ -29,8 +31,8 @@ def validate_x(user):
29
31
  return 1
30
32
  elif data.get('reason') == 'taken':
31
33
  return 0
32
- elif data.get('reason') == "improper_format":
33
- print(data.get('desc'))
34
+ elif (data.get('reason') == "improper_format" or data.get('reason') == "invalid_username"):
35
+ print("\n" +" "+f"{Fore.CYAN}X says: {data.get('desc')}{Style.RESET_ALL}")
34
36
  return 2
35
37
  else:
36
38
  return 2
File without changes
File without changes