Created
April 9, 2018 16:52
-
-
Save NISH1001/e01bb9e02925b97aa0d37309e515262c to your computer and use it in GitHub Desktop.
A naive script to check if a username is available in Instagram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
def check_user(username): | |
url = "https://www.instagram.com/{}".format(username) | |
response = requests.get(url) | |
status_code = response.status_code | |
return True if status_code == 200 else False | |
def main(): | |
print(check_user('nishparadox')) | |
if __name__ == "__main__": | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment