for akk in akks:
proc = Process(target=get_start, args=(akk, audio, chat,))
proc.start()
print("next")
time.sleep(times+7)
def get_start(akk,audio,chat):
loop = asyncio.get_event_loop()
loop.run_until_complete(start(akk,audio,chat))
async def start(akk,audio,chat):
async with telethon.TelegramClient(akk,api_id,api_hash) as client:
await client(JoinChannelRequest(chat))
group_call = pytgcalls.GroupCallFactory(client, CLIENT_TYPE).get_file_group_call(audio, "",play_on_repeat=False)
await group_call.start(chat)
await pyrogram.idle()
for i in akks:
loop = asyncio.new_event_loop()
loop.run_until_complete(start(akk,audio,chat))
time.sleep(times+7)
async def start(akk,audio,chat):
async with telethon.TelegramClient(akk,api_id,api_hash) as client:
await client(JoinChannelRequest(chat))
group_call = pytgcalls.GroupCallFactory(client, CLIENT_TYPE).get_file_group_call(audio, "",play_on_repeat=False)
await group_call.start(chat)
await client.run_until_disconnected()
async def compare_faces(img1_path, img2_path):
img1 = face_recognition.load_image_file(img1_path)
img1_encodings = face_recognition.face_encodings(img1)[0]
img2 = face_recognition.load_image_file(img2_path)
img2_encodings = face_recognition.face_encodings(img2)[0]
result = face_recognition.compare_faces([img1_encodings], img2_encodings)
if result[0]:
print("True")
return True
else:
print("False")
return False
всеравно не работает(