From 5e19c9c1abe32a1127c815187a7b12ca40d85421 Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Sat, 19 Mar 2022 08:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=BA=9B=E5=B0=8F?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- app.py | 3 +-- bin/__init__.py | 6 +++--- templates/index.html | 2 -- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0aa6796..bc2b95e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ * 上方的计数器为不更新版本只保留了最基本的功能 -## Python 版访问次数计数器使用了flask 作为服务端接收请求 +## Python 版访问次数计数器 使用了flask 作为服务端接收请求 * [文档](https://request-counter-docs.vercel.app/#/) diff --git a/app.py b/app.py index 09766c6..c5b0aa6 100644 --- a/app.py +++ b/app.py @@ -6,19 +6,18 @@ # @File Name: app.py +from gevent import pywsgi from flask import Flask from flask import Response from flask import request from flask import make_response from flask import render_template -from gevent import pywsgi from bin.utils.logger import logger from bin.utils.features import Features from bin.utils.settings import Settings from bin.utils.error import ErrorProcess from bin.utils.view import view_template - conf = Settings() if conf.type.lower() == 'mysql': diff --git a/bin/__init__.py b/bin/__init__.py index 85c139a..e3cf968 100644 --- a/bin/__init__.py +++ b/bin/__init__.py @@ -118,12 +118,12 @@ if __name__ != '__main__': if not os.path.exists('./bin/db/data.db'): logger.warning('数据库文件不存在, 即将开始下载') try: - main('https://filebase.vercel.app/data.db', 'data.db', './bin/db/') + main('https://filebase.vercel.app/download/data.db', 'data.db', './bin/db/') except requests.Timeout: logger.critical('连接超时, 将使用单线程重新尝试下载') try: - download('https://filebase.vercel.app/data.db') + download('https://filebase.vercel.app/download/data.db') except requests.Timeout: - logger.critical('连接超时, 请自行前往 https://filebase.vercel.app/data.db 下载文件') + logger.critical('连接超时, 请自行前往 https://filebase.vercel.app/download/data.db 下载文件') logger.critical('并放置在 ./bin/db/ 文件夹内') sys.exit(-1) diff --git a/templates/index.html b/templates/index.html index 49ed95c..d67c2a7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,8 +14,6 @@ a{ color: green; } - -