コード例 #1
0
    def tasks():
        t1 = time()
        old = get_old_followers(tw_username)
        new = get_new_followers(tw_username)
        new_followers = list(set(new).difference(set(old)))

        save_followers(tw_username, new)

        for n in new_followers:
            print("message sent to {}".format(n))
            send_direct_message(n)
        print("Task Complete")
        t2 = time()
        print("Task completed in sec: ", t2 - t1)
コード例 #2
0
    def tasks():
        t1 = time()
        old = get_old_followers(tw_username)
        new = get_new_followers(tw_username)
        new_followers = list(set(new).difference(set(old)))

        save_followers(tw_username, new)

        for n in new_followers:
            print("Mensagem enviada para {}".format(n))
            send_direct_message(n)
        print("Tarefa Completa")
        t2 = time()
        print("Tarefa concluída em segundo: ", t2 - t1)