user-scanner 1.0.10.2__py3-none-any.whl → 1.0.10.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/creator/producthunt.py +13 -4
- user_scanner/version.json +1 -1
- {user_scanner-1.0.10.2.dist-info → user_scanner-1.0.10.3.dist-info}/METADATA +2 -2
- {user_scanner-1.0.10.2.dist-info → user_scanner-1.0.10.3.dist-info}/RECORD +7 -7
- {user_scanner-1.0.10.2.dist-info → user_scanner-1.0.10.3.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.10.2.dist-info → user_scanner-1.0.10.3.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.10.2.dist-info → user_scanner-1.0.10.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import re
|
|
2
|
+
from user_scanner.core.orchestrator import status_validate, Result
|
|
2
3
|
|
|
3
4
|
|
|
4
|
-
def validate_producthunt(user):
|
|
5
|
+
def validate_producthunt(user: str) -> Result:
|
|
6
|
+
if not (2 <= len(user) <= 32):
|
|
7
|
+
return Result.error("Length must be 2-32 characters.")
|
|
8
|
+
|
|
9
|
+
# Rules: Letters, numbers, and underscores only.
|
|
10
|
+
if not re.match(r'^[a-zA-Z0-9_]+$', user):
|
|
11
|
+
return Result.error("Only use letters, numbers, and underscores.")
|
|
12
|
+
|
|
5
13
|
url = f"https://www.producthunt.com/@{user}"
|
|
6
14
|
|
|
7
15
|
headers = {
|
|
@@ -11,7 +19,8 @@ def validate_producthunt(user):
|
|
|
11
19
|
'Accept-Language': "en-US,en;q=0.9",
|
|
12
20
|
}
|
|
13
21
|
|
|
14
|
-
status_validate(url, 404, 200, headers=headers, follow_redirects=True)
|
|
22
|
+
return status_validate(url, 404, 200, headers=headers, follow_redirects=True)
|
|
23
|
+
|
|
15
24
|
|
|
16
25
|
if __name__ == "__main__":
|
|
17
26
|
user = input("Username?: ").strip()
|
|
@@ -22,4 +31,4 @@ if __name__ == "__main__":
|
|
|
22
31
|
elif result == 0:
|
|
23
32
|
print("Unavailable!")
|
|
24
33
|
else:
|
|
25
|
-
print("Error
|
|
34
|
+
print(f"Error occurred! Reason: {result.get_reason()}")
|
user_scanner/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: user-scanner
|
|
3
|
-
Version: 1.0.10.
|
|
3
|
+
Version: 1.0.10.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>
|
|
@@ -15,7 +15,7 @@ Project-URL: Homepage, https://github.com/kaifcodec/user-scanner
|
|
|
15
15
|
|
|
16
16
|

|
|
17
17
|
<p align="center">
|
|
18
|
-
<img src="https://img.shields.io/badge/Version-1.0.10.
|
|
18
|
+
<img src="https://img.shields.io/badge/Version-1.0.10.3-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" />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
user_scanner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
user_scanner/__main__.py,sha256=2FxtEcakyIRjakZgAOml3phvV3Sk80KlULdKvpOsAzw,5729
|
|
3
3
|
user_scanner/config.json,sha256=WtVnrpPxhGUBmx_dBShO3R0NnipVBVz3BfzlEPO5Amc,28
|
|
4
|
-
user_scanner/version.json,sha256=
|
|
4
|
+
user_scanner/version.json,sha256=k_RM2szonzxw3mqKykBb3bj4dZz11v3wuUZ16rIl4iE,50
|
|
5
5
|
user_scanner/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
user_scanner/cli/banner.py,sha256=3b4PIggnJrmxF4DfbuPMqSavpwNl0m5uedaOL2SXN3o,766
|
|
7
7
|
user_scanner/cli/printer.py,sha256=Pf26lDWVnC8bEEwOggce2JxL6zNI5UrMSHU83rl4FA0,4030
|
|
@@ -21,7 +21,7 @@ user_scanner/creator/itch_io.py,sha256=2a8UVh-_OaWQPcSUHUuijDGpWDxsR8DoCcU1BdTRq
|
|
|
21
21
|
user_scanner/creator/kaggle.py,sha256=QaXIG02OGxvQZEvwHm50RKNd7joxGOq0Ht3cFfrYEiU,445
|
|
22
22
|
user_scanner/creator/medium.py,sha256=zHU5h2VQwde1P4XihQpV7ww2P_fgGKgWZ_S0_4TTyUI,1648
|
|
23
23
|
user_scanner/creator/patreon.py,sha256=g-r85pxirf0ihK3STyGYPIzp59MB7JH64Opb4wq1fyU,461
|
|
24
|
-
user_scanner/creator/producthunt.py,sha256=
|
|
24
|
+
user_scanner/creator/producthunt.py,sha256=wb7b3hsa2Er-IQTfNFRBnU7KV5EqW_KRhL5pFvuCY88,1227
|
|
25
25
|
user_scanner/creator/substack.py,sha256=tisTUQmauteYZOZ0tULp9GGUuf4ZBEcpqv4ZmEvjyK0,1288
|
|
26
26
|
user_scanner/creator/twitch.py,sha256=blsh5sMT7miF5-xqVXYLieTILzkop2PsWqv9HhP8G40,2509
|
|
27
27
|
user_scanner/dev/__init__.py,sha256=qUR0eLwN-gO6oKk-1cmCVT4G_AxUHHMgpV3wJ7URXi4,7
|
|
@@ -65,8 +65,8 @@ user_scanner/social/youtube.py,sha256=UPu584teg75P7FT05RFG3nobbHgPmzjr-ZwyN2sw6g
|
|
|
65
65
|
user_scanner/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
66
|
user_scanner/utils/update.py,sha256=Rj3kLuUrQ-LlKGB7bkndqVjj0IUqugbDSj2SUrPRidE,936
|
|
67
67
|
user_scanner/utils/updater_logic.py,sha256=tl6kbKL02DrP-R1dkQWhHr12juVDgkJZZvKAfbI1ruU,2381
|
|
68
|
-
user_scanner-1.0.10.
|
|
69
|
-
user_scanner-1.0.10.
|
|
70
|
-
user_scanner-1.0.10.
|
|
71
|
-
user_scanner-1.0.10.
|
|
72
|
-
user_scanner-1.0.10.
|
|
68
|
+
user_scanner-1.0.10.3.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
|
|
69
|
+
user_scanner-1.0.10.3.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
|
|
70
|
+
user_scanner-1.0.10.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
71
|
+
user_scanner-1.0.10.3.dist-info/METADATA,sha256=DizTMxXqYLzZT4xAwNmGmbZyMqeiVDInS25p6SoJ5n4,5908
|
|
72
|
+
user_scanner-1.0.10.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|