def __init__(self, conf):
        super(Discogs, self).__init__()
        # http://www.discogs.com/developers/#header:home-rate-limiting
        self.rate_limit = 3.0
        # OAuth1 authentication
        import rauth
        discogs = rauth.OAuth1Service(
            consumer_key='sYGBZLljMPsYUnmGOzTX',
            consumer_secret='TtuLoHxEGvjDDOVMgmpgpXPuxudHvklk',
            request_token_url='https://api.discogs.com/oauth/request_token',
            access_token_url='https://api.discogs.com/oauth/access_token',
            authorize_url='https://www.discogs.com/oauth/authorize')
        # read token from config file
        token = (conf.get('discogs', 'token'), conf.get('discogs', 'secret'))
        # get from user
        if not token or not all(token):
            req_token, req_secret = discogs.get_request_token(headers=HEADERS)
            print('Discogs requires authentication with your own account.\n'
                  'Disable discogs in the config file or use this link to '
                  'authenticate:\n%s' % discogs.get_authorize_url(req_token))
            data = {'oauth_verifier': raw_input('Verification code: ')}
            try:
                token = discogs.get_access_token(req_token, req_secret,
                                                 data=data, headers=HEADERS)
            except __HOLE__ as err:
                self.log.critical(err.message)
                exit()
            # save token to config file
            if not conf.has_section('discogs'):
                conf.add_section('discogs')
            conf.set('discogs', 'token', token[0])
            conf.set('discogs', 'secret', token[1])
            conf.save()
        self.session = discogs.get_session(token)
        self.session.headers.update(HEADERS)
        # avoid filling cache with unusable entries
        if requests_cache \
                and not hasattr(self.session.cache, '_ignored_parameters'):
            self.session._is_cache_disabled = True  # pylint: disable=W0212
dataset/ETHPy150Open YetAnotherNerd/whatlastgenre/wlg/dataprovider.py/Discogs.__init__