fix 部分错误
This commit is contained in:
parent
d82261aa84
commit
fa66aa1c81
@ -372,6 +372,8 @@ def get_video(videoPath):
|
||||
video_save_path = os.path.join(video_tmp_path, videoPath)
|
||||
if not os.path.exists(os.path.dirname(video_save_path)):
|
||||
os.makedirs(os.path.dirname(video_save_path))
|
||||
if os.path.exists(video_save_path):
|
||||
return send_file(video_save_path)
|
||||
shutil.copy(original_img_path, video_save_path)
|
||||
return send_file(original_img_path)
|
||||
|
||||
|
@ -148,7 +148,7 @@ class MainWxInfo(BaseSubMainClass):
|
||||
|
||||
|
||||
class MainWxDbPath(BaseSubMainClass):
|
||||
mode = "db_path"
|
||||
mode = "wx_path"
|
||||
parser_kwargs = {"help": "获取微信文件夹路径"}
|
||||
|
||||
def init_parses(self, parser):
|
||||
@ -258,13 +258,6 @@ class MainShowChatRecords(BaseSubMainClass):
|
||||
parser.add_argument("-merge", "--merge_path", type=str, help="解密后的 merge_all.db 的路径", required=False,
|
||||
metavar="")
|
||||
|
||||
parser.add_argument("-msg", "--msg_path", type=str, help="解密后的 MSG.db 的路径", required=False,
|
||||
metavar="")
|
||||
parser.add_argument("-micro", "--micro_path", type=str, help="解密后的 MicroMsg.db 的路径", required=False,
|
||||
metavar="")
|
||||
parser.add_argument("-media", "--media_path", type=str, help="解密后的 MediaMSG.db 的路径", required=False,
|
||||
metavar="")
|
||||
|
||||
parser.add_argument("-wid", "--wx_path", type=str,
|
||||
help="(可选)微信文件夹的路径(用于显示图片)", required=False,
|
||||
metavar="")
|
||||
@ -283,10 +276,6 @@ class MainShowChatRecords(BaseSubMainClass):
|
||||
|
||||
# 从命令行参数获取值
|
||||
merge_path = args.merge_path
|
||||
if merge_path:
|
||||
args.msg_path = merge_path
|
||||
args.micro_path = merge_path
|
||||
args.media_path = merge_path
|
||||
|
||||
online = args.online
|
||||
|
||||
@ -295,8 +284,7 @@ class MainShowChatRecords(BaseSubMainClass):
|
||||
print("[-] 输入数据库路径不存在")
|
||||
return
|
||||
|
||||
start_falsk(msg_path=args.msg_path, micro_path=args.micro_path, media_path=args.media_path,
|
||||
wx_path=args.wx_path, key="", my_wxid=args.my_wxid, online=online)
|
||||
start_falsk(merge_path=merge_path, wx_path=args.wx_path, key="", my_wxid=args.my_wxid, online=online)
|
||||
|
||||
|
||||
class MainExportChatRecords(BaseSubMainClass):
|
||||
|
@ -11,14 +11,11 @@ import sys
|
||||
import time
|
||||
|
||||
|
||||
def start_falsk(merge_path="", msg_path="", micro_path="", media_path="", wx_path="", key="", my_wxid="", port=5000,
|
||||
def start_falsk(merge_path="", wx_path="", key="", my_wxid="", port=5000,
|
||||
online=False, debug=False, isopenBrowser=True):
|
||||
"""
|
||||
启动flask
|
||||
:param merge_path: 合并后的数据库路径
|
||||
:param msg_path: MSG.db 的路径
|
||||
:param micro_path: MicroMsg.db 的路径
|
||||
:param media_path: MediaMSG.db 的路径
|
||||
:param wx_path: 微信文件夹的路径(用于显示图片)
|
||||
:param key: 密钥
|
||||
:param my_wxid: 微信账号(本人微信id)
|
||||
@ -40,10 +37,6 @@ def start_falsk(merge_path="", msg_path="", micro_path="", media_path="", wx_pat
|
||||
from pywxdump.api import api, read_session, save_session
|
||||
import logging
|
||||
|
||||
if merge_path:
|
||||
msg_path = merge_path
|
||||
micro_path = merge_path
|
||||
media_path = merge_path
|
||||
|
||||
# 检查端口是否被占用
|
||||
if online:
|
||||
@ -75,9 +68,7 @@ def start_falsk(merge_path="", msg_path="", micro_path="", media_path="", wx_pat
|
||||
g.tmp_path = tmp_path # 临时文件夹,用于存放图片等
|
||||
g.sf = session_file # 用于存放各种基础信息
|
||||
|
||||
if msg_path: save_session(session_file, "test", "msg_path", msg_path)
|
||||
if micro_path: save_session(session_file, "test", "micro_path", micro_path)
|
||||
if media_path: save_session(session_file, "test", "media_path", media_path)
|
||||
if merge_path: save_session(session_file, "test", "merge_path", merge_path)
|
||||
if wx_path: save_session(session_file, "test", "wx_path", wx_path)
|
||||
if key: save_session(session_file, "test", "key", key)
|
||||
if my_wxid: save_session(session_file, "test", "my_wxid", my_wxid)
|
||||
|
Loading…
Reference in New Issue
Block a user