Compare commits

..

3 Commits

Author SHA1 Message Date
Cp0204
179856adca 🐛 修复Alist刷新参数及请求方式
Some checks failed
Docker Publish / build-and-push (push) Has been cancelled
2024-11-14 04:18:30 +08:00
Cp0204
ad4026955f 📦 优化忽略文件和镜像构建 2024-11-14 03:49:40 +08:00
Cp0204
a5369e0138 📝 优化README格式及代码示例缩进 2024-11-14 03:43:02 +08:00
6 changed files with 20 additions and 10 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.git
.github
__pycache__
/img

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
quark_config_debug.json
__pycache__
/config
.vscode

View File

@ -8,7 +8,7 @@ WORKDIR /app
COPY . /app
# 安装依赖
RUN pip install --no-cache-dir flask apscheduler requests treelib
RUN pip install --no-cache-dir -r requirements.txt
# 时区
ENV TZ="Asia/Shanghai"

View File

@ -46,15 +46,16 @@ class Alist:
def refresh(self, path, force_refresh=True):
url = f"{self.url}/api/fs/list"
headers = {"Authorization": self.token}
querystring = {
payload = {
"path": path,
"refresh": force_refresh,
"password": "",
"page": 1,
"per_page": 0,
}
try:
response = requests.request(
"POST", url, headers=headers, params=querystring
"POST", url, headers=headers, json=payload
)
response.raise_for_status()
response = response.json()

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
flask
apscheduler
requests
treelib