import requests
import json
import numpy as np
import time

arr_old=[2,3]
m=0
while 1:
  response = requests.get("https://api.shodan.io/shodan/host/search?key=##SHODANKEYHERE##&query=WHATUPTIME"
              ).text
  data = json.loads(response)

  arr_new=[]
  
  
  for i in range(100):
    arr_new.append(np.array(data['matches'][i]['ip_str']))

  



  print(arr_new)
  



  def Diff(li1, li2): 
      li_dif = [i for i in li1 + li2 if i not in li1 or i not in li2] 
      return li_dif 

  print(Diff(arr_new, arr_old))
  arr_old=arr_new
  print("Loop")
  print(m)
  m=m+1
  time.sleep(600)
