def query_album(self, album, artist=None, year=None, reltyp=None):
        res = self._query({'action': 'browse', 'filter_cat[1]': 1,
                           'artistname': artist, 'groupname': album})
        if not res['results']:
            return None
        res = res['results']
        # prefilter by snatched
        # make sure to enable "Enable snatched torrents indicator" in
        # your whatcd profile settings
        if len(res) > 1:
            func = lambda x: any(t['hasSnatched'] for t in x['torrents'])
            res = self._prefilter_results(res, 'snatched', True, func)
        # prefilter by reltyp
        if len(res) > 1 and reltyp:
            func = lambda x: x.get('releaseType', '').lower()
            res = self._prefilter_results(
                res, 'releasetype', reltyp.lower(), func)
        # prefilter by year
        if len(res) > 1 and year:
            func = lambda x: int(x.get('groupYear', 0))
            res = self._prefilter_results(res, 'year', int(year), func)
        results = []
        for res_ in res:
            result = {'tags': {t.replace('.', ' '): 0 for t in res_['tags']},
                      'releasetype': res_['releaseType'],
                      'date': str(res_['groupYear'])}
            snatched = [t for t in res_['torrents'] if t['hasSnatched']]
            if len(snatched) == 1 and self.conf.args.release:
                # 2nd query needed at the moment, wcdthread#203596
                result.update(self._query_release(snatched[0]['torrentId']))
            if len(res) > 1:
                result.update({'info': '%s - %s (%s) [%s]: '
                               'https://what.cd/torrents.php?id=%s'
                               % (res_['artist'], res_['groupName'],
                                  res_['groupYear'], res_['releaseType'],
                                  res_['groupId'])})
            results.append(result)
        return results
Print a single week (no newline).
dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/WhatCD.query_album--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/calendar.py/TextCalendar.prweek