params = urllib.parse.urlencode({'client': 'api', 'apikey': 'yourkey', 'appver':
    '1.5.2', 'pver': '3.0', 'url': url})
url = 'https://sb-ssl.google.com/safebrowsing/api/lookup?%s' % params
Invalid Request in Google Safe-Browsing Lookup API