def METHOD_NAME(self):
    username, password = self._get_login_info()
    if username is None:
        return
    try:
        data = self._download_json(
            'https://prod-api-funimationnow.dadcdigital.com/api/auth/login/',
            None, 'Logging in', data=urlencode_postdata({
                'username': username,
                'password': password,
            }))
        self._TOKEN = data['token']
    except ExtractorError as e:
        if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:
            error = self._parse_json(e.cause.read().decode(), None)['error']
            raise ExtractorError(error, expected=True)
        raise