def _query(self, params):
        '''Query What.CD API.'''
        self.login()
        try:
            result = self._request_json('https://what.cd/ajax.php', params)
        except requests.exceptions.TooManyRedirects:
            # whatcd session expired
            self.session.cookies.set('session', None)
            self.login()
        try:
            response = result['response']
        except __HOLE__:
            raise DataProviderError('request failure')
        return response
dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/WhatCD._query