From 7994d4481764fb78f0ce5a0ca320a8467aa7aa88 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Fri, 26 Jan 2024 17:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/api/api.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pywxdump/api/api.py b/pywxdump/api/api.py index 4646d07..923f8df 100644 --- a/pywxdump/api/api.py +++ b/pywxdump/api/api.py @@ -11,7 +11,7 @@ import os import time import shutil -from flask import Flask, request, render_template, g, Blueprint, send_file, make_response, session,send_file +from flask import Flask, request, render_template, g, Blueprint, send_file, make_response, session from pywxdump import analyzer, read_img_dat, read_audio, get_wechat_db, get_core_db from pywxdump.api.rjson import ReJson, RqJson from pywxdump.api.utils import read_session, save_session, error9999 @@ -248,15 +248,17 @@ def get_img(): return ReJson(0, out_bytes) else: return ReJson(1001, body=img_path_all) - + + @api.route('/api/video/', methods=["GET", 'POST']) def get_video(videoPath): wx_path = read_session(g.sf, "wx_path") - all_video_path = os.path.join(wx_path, videoPath) + all_video_path = os.path.join(wx_path, videoPath) if not os.path.exists(all_video_path): return ReJson(5002) return send_file(all_video_path) + @api.route('/api/audio/', methods=["GET", 'POST']) def get_audio(savePath): # savePath = request.args.get("savePath")