online_tools_2 / config.py
admin
upl ksa
751f3b1
raw
history blame
793 Bytes
import os
PERIOD = os.getenv("period")
USERS = os.getenv("users")
API = os.getenv("api")
EMAIL = os.getenv("email")
SMTP = os.getenv("smtp")
COOKIE = os.getenv("cookie")
if not (PERIOD and USERS and API and EMAIL and SMTP and COOKIE):
print("Please check the environment variables!")
exit()
else:
PERIOD = int(PERIOD)
TAG = os.getenv("target")
if not TAG:
TAG = EMAIL
HOST = os.getenv("host")
PORT = os.getenv("port")
if not (HOST and PORT):
HOST = "smtp.qq.com"
PORT = 587
else:
PORT = int(PORT)
DELAY = 1
TIMEOUT = 15
START_TIME = None
HF_DOMAIN = "https://huggingface.co"
MS_DOMAIN = "https://www.modelscope.cn"
HEADER = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537"
}