Merge branch 'master' of https://github.com/xaoyaoo/PyWxDump
This commit is contained in:
commit
575bb88c20
@ -11,7 +11,7 @@ import os
|
|||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from flask import Flask, request, render_template, g, Blueprint, send_file, make_response, session
|
from flask import Flask, request, render_template, g, Blueprint, send_file, make_response, session,send_file
|
||||||
from pywxdump import analyzer, read_img_dat, read_audio, get_wechat_db, get_core_db
|
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.rjson import ReJson, RqJson
|
||||||
from pywxdump.api.utils import read_session, save_session, error9999
|
from pywxdump.api.utils import read_session, save_session, error9999
|
||||||
@ -248,7 +248,14 @@ def get_img():
|
|||||||
return ReJson(0, out_bytes)
|
return ReJson(0, out_bytes)
|
||||||
else:
|
else:
|
||||||
return ReJson(1001, body=img_path_all)
|
return ReJson(1001, body=img_path_all)
|
||||||
|
|
||||||
|
@api.route('/api/video/<path:videoPath>', methods=["GET", 'POST'])
|
||||||
|
def get_video(videoPath):
|
||||||
|
wx_path = read_session(g.sf, "wx_path")
|
||||||
|
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/<path:savePath>', methods=["GET", 'POST'])
|
@api.route('/api/audio/<path:savePath>', methods=["GET", 'POST'])
|
||||||
def get_audio(savePath):
|
def get_audio(savePath):
|
||||||
|
Loading…
Reference in New Issue
Block a user