'Get badips.com list of bad IPs.
Parameters
category : str
Valid badips.com category.
score : int
Minimum score for bad IPs.
age : str
Age of last report for bad IPs, per badips.com syntax.
key : str, optional
Key issued by badips.com to fetch IPs reported with the
associated key.
Returns
set
Set of bad IPs.
Raises
HTTPError
Any issues with badips.com request.'

def getList(self, category, score, age, key=None):

    try:
        url = '?'.join(['/'.join([self._badips, 'get', 'list', category, str(score)]), urlencode({'age': age})])
        if key:
            url = '&'.join([url, urlencode({'key': key})])
        response = urlopen(self._Request(url), timeout=self.timeout)
    except HTTPError as response:
        messages = json.loads(response.read().decode('utf-8'))
        self._logSys.error("Failed    to    fetch    bad    IP    list.    badips.com    response:    '%s'", messages['err'])
        raise
    else:
        return set(response.read().decode('utf-8').split())
