53 lines
864 B
Python
53 lines
864 B
Python
import sys
|
|
import argparse
|
|
import os
|
|
import subprocess
|
|
import re
|
|
import hashlib
|
|
import random
|
|
import requests
|
|
import json
|
|
import asyncio
|
|
import threading
|
|
import time
|
|
import string
|
|
import shutil
|
|
import datetime
|
|
|
|
from lib.helpers import *
|
|
from lib.extension import *
|
|
|
|
import streamlit as st
|
|
|
|
ss = st.session_state
|
|
|
|
def more_tokens():
|
|
|
|
tokens = []
|
|
|
|
c = 1
|
|
for t in ss.TOKEN_LIST:
|
|
token = t["token"]
|
|
new_t = {
|
|
"id": c
|
|
}
|
|
new_t.update(t)
|
|
|
|
new_t["name"] = ""
|
|
|
|
try:
|
|
with open(f"user/{token}/settings.json") as f:
|
|
user_json = json.loads(f.read())
|
|
|
|
if "account_name" in user_json.keys():
|
|
new_t["name"] = user_json["account_name"]
|
|
except:
|
|
pass
|
|
|
|
tokens.append(new_t)
|
|
|
|
|
|
c = c + 1
|
|
|
|
st.dataframe(tokens)
|