i've been working in this simple project that tells if the instagram user is already taken or still available by just searching into the source of the get requests
Anyway when I implemented the script with manually user input it worked totally fine and here's the code :
import requests
def insta_check():
i = 10
while i > 0:
print()
username = input(" Input user to check or Enter (q) 2 quit : ").lower()
if username == 'q':
print()
print(" Good Bye ^_^ ")
break
print()
url = 'https://www.instagram.com/' + username
x = requests.get(url)
y = x.text
if 'Page Not Found' in y:
print("[+] The user [ {} ] is Available or bieng disabled by the user owner :) ".format(username))
elif 'Page Not Found' not in y:
print("[+] The user [ {} ] is Not Available :( ".format(username))
print()
insta_check()
but when I tried to get the inputs from an output file the get request start giving me wrong results ( it shows that all users are available ) IDK why and that's what I'm asking about
import requests
f = open("users", "r")
def insta_checker():
for username in f:
url = 'https://www.instagram.com/' + username
x = requests.get(url)
y = x.text
if 'Page Not Found' in y:
print("[+] The user [ {} ] is Available :) ".format(username))
elif 'Page Not Found' not in y:
print("[+] The user [ {} ] is Not Available :( ".format(username))
print()
insta_checker()