def _query(self, path, params):
        params.update({'fmt': 'json', 'limit': 1})
        result = self._request_json(
            'http://musicbrainz.org/ws/2/' + path, params)
        if 'error' in result:
            self.log.debug('%-8s error: %s', self.name, result['error'])
            return None
        if 'query' in params:
            result = result[path + 's']
        else:  # by mbid
            result = [result]
        return [{'tags': {t['name']: int(t.get('count', 0))
                          for t in r.get('tags', {})}} for r in result]
Query MusicBrainz.
dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/MusicBrainz._query