def verify_code(): """ :return: """ verify = request.form['verify'] if weibo.real_login(verify): return response_json(0, '登陆成功') else: return response_json(-1, '验证码错误')
def service_control(): """ 1.实例化WeiboUpdate对象 2.执行登录,返回验证码链接 3. :return: """ status = request.form['status'] print(status) if status == 'start': weibo.start() return response_json(0, '启动成功') else: weibo.close() return response_json(0, '关闭成功')
def run(): """ :return: url """ weibo.run(10) return response_json(0, 'success')
def get_verify_code(): """ :return: url """ url = weibo.get_verify_url() return response_json(0, 'success', {'url': url})