Closed kxvvv closed 3 weeks ago
try parse token to file in loop with try/except like this
import time
from wallet import Client
def update_token():
while True:
try:
client = Client(profile='main', headless=True)
try:
auth_token = client.get_token()
print(auth_token)
with open('token.txt', 'w') as f:
f.write(auth_token)
except Exception as e:
raise Exception(f"[!] Error get_token: {e}")
finally:
client.stop()
time.sleep(60*5)
except Exception as e:
print(f"[!] Error update_token: {e}")
time.sleep(15)
if __name__ == '__main__':
update_token()
stopped working with argument headless=True, can't find the token