Advertisement
MertcanGokgoz

whois api

Dec 20th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. try:
  2.     from urllib.request import urlopen
  3. except ImportError:
  4.     from urllib2 import urlopen
  5.  
  6. domainName = 'google.com';
  7. apiKey = '<Token>'
  8.  
  9. url = 'https://www.whoisxmlapi.com/whoisserver/WhoisService?'\
  10.     + 'domainName=' + domainName + '&apiKey=' + apiKey + "&outputFormat=JSON"
  11.  
  12. print(urlopen(url).read().decode('utf8'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement