def login_in_terminal(self, need_captcha=False, use_getpass=True):
        """不使用cookies，在终端中根据提示登陆知乎

        :param bool need_captcha: 是否要求输入验证码，如果登录失败请设为 True
        :param bool use_getpass: 是否使用安全模式输入密码，默认为 True，
            如果在某些 Windows IDE 中无法正常输入密码，请把此参数设置为 False 试试
        :return: 如果成功返回cookies字符串
        :rtype: str
        """
        print('====== zhihu login =====')

        email = input('email: ')
        if use_getpass:
            password = getpass.getpass('password: ')
        else:
            password = input("password: ")

        if need_captcha:
            captcha_data = self.get_captcha()
            with open('captcha.gif', 'wb') as f:
                f.write(captcha_data)

            print('please check captcha.gif for captcha')
            captcha = input('captcha: ')
            os.remove('captcha.gif')
        else:
            captcha = None

        print('====== logging.... =====')

        code, msg, cookies = self.login(email, password, captcha)

        if code == 0:
            print('login successfully')
        else:
            print('login failed, reason: {0}'.format(msg))

        return cookies