清理已经废弃的代码(可能会存在有用代码被清除)
This commit is contained in:
parent
e45716805c
commit
8b3d2f6579
@ -10,7 +10,7 @@ import time
|
|||||||
from collections import Counter
|
from collections import Counter
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from .db_parsing import parse_xml_string
|
from pywxdump.dbpreprocess.utils import xml2dict
|
||||||
|
|
||||||
|
|
||||||
def read_msgs(MSG_path, selected_talker=None, start_time=time.time() * 3600 * 24 * 365, end_time=time.time()):
|
def read_msgs(MSG_path, selected_talker=None, start_time=time.time() * 3600 * 24 * 365, end_time=time.time()):
|
||||||
@ -59,7 +59,7 @@ def read_msgs(MSG_path, selected_talker=None, start_time=time.time() * 3600 * 24
|
|||||||
|
|
||||||
def get_emoji_cdnurl(row):
|
def get_emoji_cdnurl(row):
|
||||||
if row["type_name"] == "动画表情":
|
if row["type_name"] == "动画表情":
|
||||||
parsed_content = parse_xml_string(row["StrContent"])
|
parsed_content = xml2dict(row["StrContent"])
|
||||||
if isinstance(parsed_content, dict) and "emoji" in parsed_content:
|
if isinstance(parsed_content, dict) and "emoji" in parsed_content:
|
||||||
return parsed_content["emoji"].get("cdnurl", "")
|
return parsed_content["emoji"].get("cdnurl", "")
|
||||||
return row["content"]
|
return row["content"]
|
||||||
|
Loading…
Reference in New Issue
Block a user