Files
YYeTsBot/yyetsbot/config.py

41 lines
1.4 KiB
Python
Raw Normal View History

2021-01-18 22:26:02 +08:00
# coding: utf-8
# YYeTsBot - config.py
# 2019/8/15 18:42
__author__ = 'Benny <benny.think@gmail.com>'
import os
2021-01-22 20:44:59 +08:00
# website config
# yyets
2021-01-18 22:26:02 +08:00
BASE_URL = "http://www.rrys2020.com"
LOGIN_URL = "http://www.rrys2020.com/user/login"
GET_USER = "http://www.rrys2020.com/user/login/getCurUserTopInfo"
2021-01-20 21:51:03 +08:00
YYETS_SEARCH_URL = "http://www.rrys2020.com/search?keyword={kw}&type=resource"
2021-01-18 22:26:02 +08:00
AJAX_LOGIN = "http://www.rrys2020.com/User/Login/ajaxLogin"
SHARE_URL = "http://www.rrys2020.com/resource/ushare"
SHARE_WEB = "http://got002.com/resource.html?code={code}"
# http://got002.com/api/v1/static/resource/detail?code=9YxN91
SHARE_API = "http://got002.com/api/v1/static/resource/detail?code={code}"
2021-01-22 20:44:59 +08:00
# fix
FIX_RESOURCE = "https://www.zimuxia.cn/portfolio/{name}"
FIX_SEARCH = "https://www.zimuxia.cn/?s={kw}"
# cloudflare worker
WORKERS = "https://yyets.yyetsdb.workers.dev/resource.html?id={id}"
2021-01-18 22:26:02 +08:00
2021-01-22 20:44:59 +08:00
# authentication config
2021-01-18 22:26:02 +08:00
TOKEN = os.environ.get("TOKEN") or "TOKEN"
USERNAME = os.environ.get("USERNAME") or "USERNAME"
PASSWORD = os.environ.get("PASSWORD") or "password"
2021-01-22 20:44:59 +08:00
# network and server config
2021-01-18 22:26:02 +08:00
PROXY = os.environ.get("PROXY")
2021-01-22 20:44:59 +08:00
REDIS = os.environ.get("REDIS") or "redis"
MONGO = os.environ.get("MONGO") or "mongo"
# other
2021-01-18 22:26:02 +08:00
MAINTAINER = os.environ.get("MAINTAINER")
REPORT = os.environ.get("REPORT") or False
# This name must match class name, other wise this bot won't functional.
2021-01-22 23:37:21 +08:00
FANSUB_ORDER: str = os.environ.get("ORDER") or 'ZimuxiaOnline,YYeTsOffline'