Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kjniedz authored Jul 3, 2020
1 parent fe77b17 commit 77e5fbf
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions SoundCloud_Username_Check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os
import requests
from colorama import Fore, Back, Style

red = Fore.RED + Style.BRIGHT
green = Fore.GREEN + Style.BRIGHT

os.system("cls")

ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
usernames = os.path.join(ROOT_PATH, "usernames.txt")
result = os.path.join(ROOT_PATH, "results.txt")

# 404 - invalid
# 200 - valid

url = "https://soundcloud.com/"

a = open(usernames,"r").readlines()
file = [s.rstrip()for s in a]

for lines in file:

username = lines.split()[0]

done = url+username

r = requests.get(done)

if r.status_code == 404:
print(green+username,"| Available")
with open(result,"a") as work:
work.write(username+"\n")
elif r.status_code == 200:
print(red+username,"| Unavailable")

0 comments on commit 77e5fbf

Please sign in to comment.