0
from shodan import WebAPI
SHODAN_API_KEY = "MY API KEY"
api = WebAPI(SHODAN_API_KEY)
host = api.host('98.111.2.190')
# Print general info
try:
print """
IP: %s
Country: %s
City: %s
""" % (host['ip'], host.get('country', None), host.get('city', None))
except WebAPIError:
print "No information available for that IP."
Je reçois shodan.api.WebAPIError: No information available for that IP.
quand il ne peut pas trouver l'adresse IP dans la base de données, comment puis-je soulever cette exception à imprimer qu'il n'y a pas d'information disponible pour cette ip.comment soulever cette exception