Skip to content

Instantly share code, notes, and snippets.

@felipecaon
Created June 27, 2023 13:47
Show Gist options
  • Save felipecaon/f4bec4606b546f431d3ce4e097a95b17 to your computer and use it in GitHub Desktop.
Save felipecaon/f4bec4606b546f431d3ce4e097a95b17 to your computer and use it in GitHub Desktop.
whoxy python script
import requests
apikey = ""
page = 1
url = f"https://api.whoxy.com/?key={apikey}&reverse=whois&identifier=filter&mode=micro&page={page}"
response = requests.get(url)
file_path = 'company.txt'
file = open(file_path, 'w')
if response.status_code == 200:
data = response.json()
total_pages = data['total_pages']
print("paginas totais ==>", total_pages)
search_result = data['search_result']
for s in search_result:
domains = s['domain_name']
file.write(domains + '\n')
if total_pages != 1:
for i in range(total_pages+1):
print("querying page", i)
response = requests.get(url)
data = response.json()
search_result = data['search_result']
for s in search_result:
domains = s['domain_name']
file.write(domains + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment