Skip to content

Commit

Permalink
import 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Aug 18, 2024
1 parent b799cb1 commit 799b28a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
7 changes: 4 additions & 3 deletions pywxdump/db/dbFavorite.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
# Author: xaoyaoo
# Date: 2024/05/18
# -------------------------------------------------------------------------------
import pandas as pd

from .dbbase import DatabaseBase
from .utils import timestamp2str, xml2dict

Expand Down Expand Up @@ -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) # 处理时间
Expand Down
10 changes: 3 additions & 7 deletions pywxdump/db/dbMSG.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pyahocorasick
lz4
blackboxprotobuf
lxml
pandas
dbutils
psutil
pymem
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"lz4",
"blackboxprotobuf",
"lxml",
"pandas",
"dbutils",

"fastapi",
Expand Down

0 comments on commit 799b28a

Please sign in to comment.