kirby1997 / discordusernameavailabilitychecker Goto Github PK
View Code? Open in Web Editor NEWA Python script to check if words from a wordlist are available as a Discord username
License: GNU General Public License v3.0
A Python script to check if words from a wordlist are available as a Discord username
License: GNU General Public License v3.0
Import requests does not work.
, line 2, in <module> import requests ModuleNotFoundError: No module named 'requests'
.
It is installed, though:
Requirement already satisfied: request in [my path].
import time
import requests
import requests
token = "" # INSERT YOUR TOKEN INTO THE QUOTES. DO NOT SHARE THIS TOKEN.
headers = {"Authorization": token}
with open("proxies.txt") as proxy:
proxies = [line.strip() for line in proxy]
endpoint = "https://discord.com/api/v10/users/@me/pomelo"
with open("usernames.txt") as file:
usernames = [line.strip() for line in file]
available_usernames = []
for username in usernames:
url = endpoint
body = {
"username": username
}
response = requests.post(url, headers=headers, json=body, proxies={"http": proxies, "https":proxies},timeout=3)
# Rate limit check
if response.status_code == 429:
sleep_time = response.json()["retry_after"]
print(f"Rate limit hit. Sleeping for {sleep_time}s")
time.sleep(sleep_time)
response = requests.post(url, headers=headers, json=body, proxies=proxies)
#username available check
if response.json()['code'] == 40001:
print(f"{username} is available")
available_usernames.append(username)
#Username unavailable check
elif response.json()['code'] == 50035:
print(f"{username} is taken")
#Some other error
else:
print(f"Error checking {username}: {response.json()['message']}")
with open("available_usernames.txt", "w") as file:
file.write("\n".join(available_usernames))
it marks taken usernames as available
Hey, so i was trying to check some usernames but every time it's marked as not taken but even with a username that i know is taken is still marked as not taken by your script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.