def query_album(self, album, artist=None, year=None, reltyp=None):
        params = {'release_title': album}
        if artist:
            params.update({'artist': artist})
        result = self._request_json('https://api.discogs.com/database/search',
                                    params)
        if not result['results']:
            return None
        # merge all releases and masters
        tags = set()
        for res in result['results']:
            if res['type'] in ['master', 'release']:
                for key in ['genre', 'style']:
                    tags.update(res.get(key))
        return [{'tags': {tag: 0 for tag in tags}}]
Query for album data.
dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/Discogs.query_album