Created
April 25, 2023 19:33
-
-
Save im-noob/aa07c341de08837dcbfa7fd965aedbe5 to your computer and use it in GitHub Desktop.
Domain Name Check in python
This file contains 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
!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