Esempio n. 1
0
def verify_code():
    """
    
    :return: 
    """
    verify = request.form['verify']
    if weibo.real_login(verify):
        return response_json(0, '登陆成功')
    else:
        return response_json(-1, '验证码错误')
Esempio n. 2
0
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, '关闭成功')
Esempio n. 3
0
def run():
    """

    :return: url
    """
    weibo.run(10)
    return response_json(0, 'success')
Esempio n. 4
0
def get_verify_code():
    """
    
    :return: url
    """
    url = weibo.get_verify_url()
    return response_json(0, 'success', {'url': url})