-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
24 lines (17 loc) · 1008 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from Workers import MultiThreadedWorker
from rStuff import rBot
from info import useragent, client_id, client_code, bot_username, bot_pass
from time import sleep
def main():
twitterlinker = rBot(useragent, client_id, client_code, bot_username, bot_pass)
subs_listening_by_new = ["turkey", "svihs", "testyapiyorum", "kgbtr", "ateistturk"]
twitterlinker.create_or_update_multi(multiname="listening", subs=subs_listening_by_new) # create the multi to listen to
multi_threaded_worker = MultiThreadedWorker(twitterlinker)
multi_threaded_worker.run_threads()
while True:
if any(list(multi_threaded_worker.job_q.queue)) or any(list(multi_threaded_worker.reply_q.queue)):
print(f"searching jobs: {[search[1].data.to_answer for search in list(multi_threaded_worker.job_q.queue)[:10]]}")
print(f"replying jobs: {[replyy[1].data.thing for replyy in list(multi_threaded_worker.reply_q.queue)[:10]]}")
sleep(15)
if __name__ == '__main__':
main()