config.py 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : config.py
  4. # Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
  5. # Date : 2022/9/6
  6. DIALECT = 'mysql'
  7. DRIVER = 'pymysql'
  8. USERNAME = 'gp'
  9. PASSWORD = '123456'
  10. HOST = '127.0.0.1'
  11. PORT = '3306'
  12. DATABASE = 'pira'
  13. # DB_URI = '{}+{}://{}:{}@{}:{}/{}?charset=utf8'.format(DIALECT, DRIVER, USERNAME, PASSWORD, HOST, PORT, DATABASE)
  14. # DB_URI = 'sqlite:///models/rules.db?charset=utf8&check_same_thread=False'
  15. DB_URI = 'sqlite:///base/rules.db?charset=utf8&check_same_thread=False'
  16. SQLALCHEMY_DATABASE_URI = DB_URI
  17. SQLALCHEMY_TRACK_MODIFICATIONS = False
  18. SQLALCHEMY_ECHO = False # 打印sql语句
  19. JSON_AS_ASCII = False # jsonify返回的中文正常显示
  20. PLAY_URL = 'http://cms.nokia.press' # 匹配远程解析服务器链接 远程接口主页地址,后面不能有/
  21. PLAY_URL = PLAY_URL.rstrip('/')
  22. PID_URL = '' # 自定义的9001进程管理快捷方式
  23. PID_URL = PID_URL.rstrip('/')
  24. HTTP_HOST = '0.0.0.0'
  25. HTTP_PORT = '5705'
  26. PLAY_DISABLE = False # 全局禁用播放解析
  27. LAZYPARSE_MODE = 1 # 播放解析模式(0 本地 1 局域网 2远程 仅在全局禁用为False的时候生效)
  28. WALL_PAPER_ENABLE = True # 启用自定义壁纸
  29. # WALL_PAPER = "https://picsum.photos/1280/720/?blur=10" # 自定义壁纸,可注释
  30. WALL_PAPER = "https://tuapi.eees.cc/api.php?category=fengjing&type=302" # 自定义壁纸,可注释
  31. SUP_PORT = 9001 # supervisord 服务端口
  32. RETRY_CNT = 3 # 验证码重试次数
  33. # OCR_API = 'http://192.168.3.224:9000/api/ocr_img' # 验证码识别接口,传参数data
  34. # OCR_API = 'http://dm.mudery.com:10000' # 验证码识别接口,传参数data
  35. OCR_API = 'https://api.nn.ci/ocr/b64/text' # 验证码识别接口,传参数data
  36. UNAME = 'admin' # 管理员账号
  37. PWD = 'drpy' # 管理员密码
  38. USE_PY = 0 # 开启py源
  39. JS0_DISABLE = 0 # 禁用js0
  40. JS0_PASSWORD = '' # js0密码
  41. JS_MODE = 0 # js模式 0 drpy服务器解析 1 pluto本地解析
  42. MAX_CONTENT_LENGTH = 1 * 1024 * 100 # 100 kB
  43. LIVE_MODE = 0 # 0 本地 1外网
  44. # LIVE_URL = 'https://gitcode.net/bd/v/-/raw/main/live/zb.txt' # 初始化外网直播地址(后续在管理界面改)
  45. # LIVE_URL = 'https://agit.ai/hu/hcr/raw/commit/f8e9c10309a533e5b06df133f859c45cb91f4731/0ER.txt' # 月光直播接口
  46. LIVE_URL = 'https://raw.fastgit.org/zhanghong1983/TVBOXZY/main/TV/live.txt' # 初始化外网直播地址(后续在管理界面改)
  47. CATE_EXCLUDE = '首页|留言|APP|下载|资讯|新闻|动态|明星|专题|最新|排行|解析' # 动态分类过滤
  48. TAB_EXCLUDE = '猜你|喜欢|APP|下载|剧情|简介|排序' # 动态线路名过滤
  49. # {% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %}
  50. SEARCH_TIMEOUT = 5000 # 聚搜超时毫秒
  51. SEARCH_LIMIT = 24 # 聚搜限制条数
  52. MULTI_MODE = 0 # 多源模式
  53. XR_MODE = 1 # 仙人模式
  54. JS_PROXY = 'http://localhost:5705/admin/view/=>https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/' # 源代理
  55. ALI_TOKEN = '' # 适用于初始配置的阿里云token
  56. ENV = '{"bili_cookie":""}' # 自定义环境变量