Jul-16-2022, 04:32 PM
I am going through this Book "Complete Guide to Shodan" and there is this code but it doesn't work
import shodan api = shodan.Shodan('myapikeyhere') # Wrap the request in a try/ except block to catch errors try: results = api.search('apache') print('Results found: %s' % results['total']) for result in results['matches']: print('IP: %s' % result['ip_str']) print(result['data']) print('') except shodan.APIError, e: print('Error: %s' % e)The error I am getting
except shodan.APIError, e: ^^^^^^^^^^^^^^^^^^ SyntaxError: multiple exception types must be parenthesized