From 05f0a609dea18d37c182e1d3f9ef0e3ac4fdcf37 Mon Sep 17 00:00:00 2001 From: Evil0ctal Date: Thu, 21 Apr 2022 05:11:46 -0700 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=8F=B7=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_api.py b/web_api.py index f856db1..703efaf 100644 --- a/web_api.py +++ b/web_api.py @@ -64,7 +64,7 @@ def webapi(): content = request.args.get("url") if content != '': post_content = find_url(content)[0] - if api_config['Allow_Logs']: + if api_config['Allow_Logs'] == 'True': # 将API记录在API_logs.txt中 date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) with open('API_logs.txt', 'a') as f: @@ -108,7 +108,7 @@ def download_video(): # 用于返回视频下载请求(返回MP4文件下载请求,面对大量请求时非常吃服务器内存,容易崩,慎用。) # 将api_switch的值设定为False可关闭该API api_switch = api_config['Video_Download'] - if api_switch: + if api_switch == 'True': api = Scraper() content = request.args.get("url") if content == '': @@ -171,7 +171,7 @@ def download_music(): # 用于返回视频下载请求(返回MP3文件下载请求,面对大量请求时非常吃服务器内存,容易崩,慎用。) # 将api_switch的值设定为False可关闭该API api_switch = api_config['Music_Download'] - if api_switch: + if api_switch == 'True': api = Scraper() content = request.args.get("url") if content == '':