Пример #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
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
        # 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()
            print("========LOLWAIT==============")
            condition.release()
            print("========LOL==============")
        repFiles = saveReplies([omegle,
                                telegram])  # Save omegle and telegram replies
        emotionsAndSentiments = analyze(repFiles)
        timeMetric, rulesMetric = analytics.getMetrics([omegle, telegram])
        saveMetrics(emotionsAndSentiments[0], emotionsAndSentiments[1],
                    timeMetric, rulesMetric, repFiles)
        # OMEGLE NOTIFICATION
        omegle.reset()

##if __name__ == '__main__':
##    omegle = omegleExtractor()
##    while (True):
##        omegle.moti()
##        print("------> OMEGLE TRANSACTION : " + str(omegle.getTradeAccomplish()))
##        repFiles = saveReplies([omegle])
##        emotionsAndSentiments = analyze(repFiles)
##        timeMetric, rulesMetric = analytics.getMetrics( [omegle] )
##        saveMetrics( emotionsAndSentiments[0], emotionsAndSentiments[1], timeMetric, rulesMetric, repFiles )
##        omegle.reset()
Пример #4
0
    metrics = analytics.getMetrics(bots)
    #saveMetrics( emotionsAndSentiments[0], emotionsAndSentiments[1], metrics, repFiles )


if __name__ == '__main__':
    snapchat = snapExtractor()
    omegle = omegleExtractor()
    while (True):
        omegle.moti(snapchat)
        tradeSnapchat = omegle.getTradeAccomplish()
        if (tradeSnapchat):
            snapchat.moti()
        repFiles = saveReplies([omegle,
                                snapchat])  # Save omegle and telegram replies
        emotionsAndSentiments = analyze(repFiles)
        timeMetric, rulesMetric = analytics.getMetrics([omegle, snapchat])
        saveMetrics(emotionsAndSentiments[0], emotionsAndSentiments[1],
                    timeMetric, rulesMetric, repFiles)
        # OMEGLE NOTIFICATION
        omegle.reset()
        snapchat.reset()
"""
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