Skip to content

Instantly share code, notes, and snippets.

@Quantum-Codes
Created January 19, 2022 07:35
Show Gist options
  • Save Quantum-Codes/665d2d0974a8c7b005d3c02348871f29 to your computer and use it in GitHub Desktop.
Save Quantum-Codes/665d2d0974a8c7b005d3c02348871f29 to your computer and use it in GitHub Desktop.
Check whether a username is valid or not in python (ScraGet)
from ScraGet import ScraGet
username = ScraGet.get_user_extra()
user = input("Username to check: ").strip()
username.check_user(user)
if username.valid:
if username.taken:
print(f"{user} is valid but already taken")
else:
print(f"{user} is valid and not taken!")
else:
print(f"{user} is invalid..")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment