예제 #1
0
파일: sign.py 프로젝트: xen0n/zhihu-rss
def record_sign_info(my_app, root, sign_dialog):
    email_input = find_view(root, 'email_input')
    password_input = find_view(root, 'password_input')
    url_input = find_view(root, 'url_input')

    # TODO: set email and password
    email = email_input.property("text")
    password = password_input.property("text")
    url = url_input.property("text")

    answers = get_answers(url, url_input)
    answer = next(answers)

    load_answer(answer.html, my_app.web_view)

    if answers:
        sign_dialog.close()
예제 #2
0
파일: add.py 프로젝트: xen0n/zhihu-rss
def record_add_info(my_app, add_dialog, error_dialog):

    root = add_dialog.root_view
    url_input = find_view(root, 'url_input')
    feed_num_input = find_view(root, 'feed_num_input')

    url = url_input.property("text")
    feed_num = feed_num_input.property("text")

    add_dialog.close()

    try:
        noticer = Noticer(url=url)
    except UrlError:
        error_dialog.set_error_info("添加失败。错误:主页url无效!")
        error_dialog.show()
        return

    # progress_dialog = progress.show_progress_dialog(noticer.name, feed_num)

    add_new_feedslist(my_app, noticer, feed_num)