find username instagram code example
Example: instagram username checker
import requests
import random
import time
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
f = open("username_text_file.txt", "r")
data = f.readlines()
for un in data:
time.sleep(1 * random.random())
url = "https://www.instagram.com/"+str(un[:4])
x = requests.get(url, verify = False)
if x.status_code == 200:
print("skip - " + un[:4]+ " - "+ str(data.index(un)))
else:
print("available - " + un[:4] + " - "+ str(data.index(un)))
f2 = open("available_usernames.txt", "a")
f2.write(un)
f2.close()
if int(data.index(un))%20 == 0:
time.sleep(5)