Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def run_buyer():
- loop = asyncio.new_event_loop()
- # get SMS code ( my func )
- def receive_sms():
- global was_receive
- time.sleep(30) # this code will not implemented
- code = sms.get_status(number_id)
- if 'STATUS_OK' in code:
- was_receive = True
- return code[10:]
- name = names.get_full_name().split()
- try:
- # login
- client = TelegramClient('sessions/' + str(number), app.api_id, app.api_hash,
- proxy=get_proxy()).start(
- phone=number, force_sms=True, code_callback=receive_sms, first_name=name[0], last_name=name[1])
- print(client)
- except RuntimeError:
- ...
- for _ in range(0, self.count):
- Thread(target=run_buyer).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement