示例#1
0
def firstImplementation():
    bots = list()
    threads = list()
    for i in range(0, BOTS_N):
        a = omegleExtractor()
        bots.append(a)
        thread = Thread(target=startBot, args=(a, ))
        threads.append(thread)
    for t in threads:
        t.start()
        t.join()
    for t in threads:
        t.join()
    print(
        "=============================================================================================================="
    )
    repFiles = saveReplies(bots)
    emotionsAndSentiments = analyze(repFiles)
    metrics = analytics.getMetrics(bots)
示例#2
0
文件: main.py 项目: Zekkenn/C3-Sex
def firstImplementation():
    """
        Threads of bot, initializer.
    """
    bots = list()
    threads = list()
    for i in range(0, BOTS_N):
        a = omegleExtractor()
        bots.append(a)
        thread = Thread(target=startBot, args=(a, ))
        threads.append(thread)
    for t in threads:
        t.start()
        t.join()
    for t in threads:
        t.join()
    print(
        "=============================================================================================================="
    )
    # repFiles is an array with all files names
    repFiles = saveReplies(bots)
    emotionsAndSentiments = analyze(repFiles)
    metrics = analytics.getMetrics(bots)
示例#3
0
文件: main.py 项目: Zekkenn/C3-Sex
        t.join()
    for t in threads:
        t.join()
    print(
        "=============================================================================================================="
    )
    # repFiles is an array with all files names
    repFiles = saveReplies(bots)
    emotionsAndSentiments = analyze(repFiles)
    metrics = analytics.getMetrics(bots)
    #saveMetrics( emotionsAndSentiments[0], emotionsAndSentiments[1], metrics, repFiles )


if __name__ == '__main__':
    telegram = telegramExtractor()
    omegle = omegleExtractor()
    threadTelegram = Thread(target=startBot, args=(telegram, ))
    threadTelegram.start()
    condition = threading.Condition()
    while (True):
        tradeTelegram = omegle.moti(telegram)
        # TELEGRAM NOTIFICATION
        # omegle.getTradeAccomplish() # Trade Accomplish to notify telegram
        if (tradeTelegram):
            # End of telegram conversation
            # Get telegram user replies
            print("========LOLACQUIRE==============")
            condition.acquire()
            print("========LOLTRADE==============")
            telegram.tradeAccomplish(condition)
            condition.wait()