SafeBrowsing API Python Client Version 0.3

To download the library, use this link.

To make changes to a library, follow these steps:

  1. Save the diff file in the library directory that contains the client.py.
  2. Execute this command:
    patch client.py sb-python.diff

In some cases (for example, if you are using a different version of the library), it may be necessary to do this manually.

The table below shows a list of source files in the library that require changes.

File Changes
client.py
  1. Find the following section:

     def __init__(self, ds, apikey, hp=('safebrowsing.clients.google.com', 80),
                   ssl_hp=('sb-ssl.google.com', 443), base_path='/safebrowsing',
  2. Substitute the following:

      def __init__(self, ds, apikey, hp=('sba.yandex.net', 80),
                   ssl_hp=('sba.yandex.net', 443), base_path='',
server.py
  1. Find the following section:

    sbls.append(sblist.List(line.strip()))
  2. Substitute the following:

    if line.strip().endswith('-shavar'):
        sbls.append(sblist.List(line.strip()))