I'm really confused on how to bypass this problem from whois, is there a way so that when whois outputs the domain variable and it doesn't contain the specific variable that i want to showcase, it would just skip it instead of giving me an error?
Image may be NSFW.
Clik here to view.
And below does not contain any web variable when whois outputs.Image may be NSFW.
Clik here to view.
This is the error that i got when inside the array list doesn't contain any emails variables.
Cell In [419], line 4, in whodata(host) 2 res = whois.whois(host) 3 print(res['registrar'])----> 4 print(res['emails']) 5 print(res['country']) 6 print("---------")KeyError: 'emails'
import whoisdef whodata(host): res = whois.whois(host) print(res['registrar']) print(res['emails']) print(res['country']) print("---------")test = ["minecraft.net", "google.com",'mob1lebn1-co.id.co.id']for host in test: whodata(host)