Skip to content

Instantly share code, notes, and snippets.

@im-noob
Created April 25, 2023 19:33
Show Gist options
  • Save im-noob/aa07c341de08837dcbfa7fd965aedbe5 to your computer and use it in GitHub Desktop.
Save im-noob/aa07c341de08837dcbfa7fd965aedbe5 to your computer and use it in GitHub Desktop.
Domain Name Check in python
!pip install python-whois
import whois
final_list = set()
def check_domain(name):
try:
data = whois.whois(name)
except whois.parser.PywhoisError:
final_list.add(name)
domains = ['jadu-hai-nasha.com', 'nasha.com', 'google.com']
for domain in domains:
check_domain(domain)
final_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment