user-scanner 1.0.1.2__py3-none-any.whl → 1.0.1.3__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/social/discord.py +44 -0
- {user_scanner-1.0.1.2.dist-info → user_scanner-1.0.1.3.dist-info}/METADATA +1 -1
- {user_scanner-1.0.1.2.dist-info → user_scanner-1.0.1.3.dist-info}/RECORD +6 -5
- {user_scanner-1.0.1.2.dist-info → user_scanner-1.0.1.3.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.1.2.dist-info → user_scanner-1.0.1.3.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.1.2.dist-info → user_scanner-1.0.1.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import httpx
|
|
2
|
+
from httpx import ConnectError, TimeoutException
|
|
3
|
+
|
|
4
|
+
def validate_discord(user):
|
|
5
|
+
url = "https://discord.com/api/v9/unique-username/username-attempt-unauthed"
|
|
6
|
+
|
|
7
|
+
headers = {
|
|
8
|
+
"authority": "discord.com",
|
|
9
|
+
"accept": "/",
|
|
10
|
+
"accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
"origin": "https://discord.com",
|
|
13
|
+
"referer": "https://discord.com/register"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
data = {"username": user}
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
response = httpx.post(url, headers=headers, json=data, timeout=3.0)
|
|
20
|
+
if response.status_code == 200:
|
|
21
|
+
status = response.json().get("taken")
|
|
22
|
+
if status is True:
|
|
23
|
+
return 0
|
|
24
|
+
elif status is False:
|
|
25
|
+
return 1
|
|
26
|
+
return 2
|
|
27
|
+
except (ConnectError, TimeoutException):
|
|
28
|
+
return 2
|
|
29
|
+
except Exception:
|
|
30
|
+
return 2
|
|
31
|
+
|
|
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
|
+
|
|
44
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: user-scanner
|
|
3
|
-
Version: 1.0.1.
|
|
3
|
+
Version: 1.0.1.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>
|
|
@@ -25,6 +25,7 @@ user_scanner/gaming/osu.py,sha256=Jz_s6qNURC-L10-MSfTh6mEywoEqOh8Stvb_bWJR_0I,12
|
|
|
25
25
|
user_scanner/gaming/roblox.py,sha256=1Chdg5f4C5uWuCcYM6JGt7kxYCRHC8E5OkTgHwFKXC4,1528
|
|
26
26
|
user_scanner/social/__init__.py,sha256=jaCkFwX1uYtF0ENifVwF8OfHrYYUTm64B9wlBq9BBfQ,9
|
|
27
27
|
user_scanner/social/bluesky.py,sha256=r5UIFCStlwEM4UxE6cDTrDb5w_EqPCgJ2iYz27GpjA8,2157
|
|
28
|
+
user_scanner/social/discord.py,sha256=3TaYAzqK9sPKzL_GPzli4P-U22Dwe-mSmeH6kVHJXI4,1137
|
|
28
29
|
user_scanner/social/instagram.py,sha256=oskZgHagkyl_p-bi7CMYqCh0wsoqfCFnR7GZcbKX1-U,1229
|
|
29
30
|
user_scanner/social/mastodon.py,sha256=KbhdutPe_M0bvtkJXz2VEhalSEgA7n-bUbrkR3pYAb4,1276
|
|
30
31
|
user_scanner/social/pinterest.py,sha256=LHCiTmPALPLYXDClz09EBKRREhs5u3CajeFiQg5Vvlg,1168
|
|
@@ -34,8 +35,8 @@ user_scanner/social/telegram.py,sha256=QxK2jD2QEvrYmnkxysl_yk7-G6CRWvkK5EnK6n5q3
|
|
|
34
35
|
user_scanner/social/threads.py,sha256=QRidTYquAMDHJSg68ySpWCbliRYdWJkbOqn8RfWzFQQ,1231
|
|
35
36
|
user_scanner/social/x.py,sha256=NetPGmPnWEKv6za9E_Ekah9bAeeFlEeY3qbTJQo7AqE,1560
|
|
36
37
|
user_scanner/social/youtube.py,sha256=zuyWCy5FtEilaIcUZ4dTCctRR9deFnwwWJkf-h_1K0E,1943
|
|
37
|
-
user_scanner-1.0.1.
|
|
38
|
-
user_scanner-1.0.1.
|
|
39
|
-
user_scanner-1.0.1.
|
|
40
|
-
user_scanner-1.0.1.
|
|
41
|
-
user_scanner-1.0.1.
|
|
38
|
+
user_scanner-1.0.1.3.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
|
|
39
|
+
user_scanner-1.0.1.3.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
|
|
40
|
+
user_scanner-1.0.1.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
41
|
+
user_scanner-1.0.1.3.dist-info/METADATA,sha256=-dUlob2LSFuB9TNBCpUBCKua6VEmB1rnoygiK7f3llA,2363
|
|
42
|
+
user_scanner-1.0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|