diff --git a/pywxdump/db/dbFavorite.py b/pywxdump/db/dbFavorite.py index a558c282..568c128d 100644 --- a/pywxdump/db/dbFavorite.py +++ b/pywxdump/db/dbFavorite.py @@ -5,8 +5,6 @@ # Author: xaoyaoo # Date: 2024/05/18 # ------------------------------------------------------------------------------- -import pandas as pd - from .dbbase import DatabaseBase from .utils import timestamp2str, xml2dict @@ -127,7 +125,10 @@ def get_favorite(self): FavTagsDict = {} for FavLocalID, TagName in FavTags: FavTagsDict[FavLocalID] = FavTagsDict.get(FavLocalID, []) + [TagName] - + try: + import pandas as pd + except ImportError: + return False pf = pd.DataFrame(FavItemsList) pf.columns = FavItemsFields.keys() # set column names pf["UpdateTime"] = pf["UpdateTime"].apply(timestamp2str) # 处理时间 diff --git a/pywxdump/db/dbMSG.py b/pywxdump/db/dbMSG.py index d3d6623f..400b2c83 100644 --- a/pywxdump/db/dbMSG.py +++ b/pywxdump/db/dbMSG.py @@ -8,16 +8,12 @@ import json import os import re -# import time - -# import pandas as pd - -from .dbbase import DatabaseBase -from .utils import db_error, timestamp2str, xml2dict, match_BytesExtra, type_converter, \ - get_md5, name2typeid, db_loger import lz4.block import blackboxprotobuf +from .dbbase import DatabaseBase +from .utils import db_error, timestamp2str, xml2dict, match_BytesExtra, type_converter + class MsgHandler(DatabaseBase): _class_name = "MSG" diff --git a/requirements.txt b/requirements.txt index a5c799cd..03539fe1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,6 @@ pyahocorasick lz4 blackboxprotobuf lxml -pandas dbutils psutil pymem diff --git a/setup.py b/setup.py index a6c17f45..65f31543 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ "lz4", "blackboxprotobuf", "lxml", - "pandas", "dbutils", "fastapi",