增加更多控件类型和新增获取指定聊天窗口的聊天记录,并按时间信息分组的功能 #70
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
增加更多控件类型
我获取聊天记录时,发现有两个控件无法识别
“以下是新信息”
这个控件在微信里显示的是“以下是新信息”,但在list_item_control.Name里却是"以下为新消息",有点怪
增加了新的条件:
“英文版的对方打开红包”
之前把"Red packet"加入了判断条件,但没想到微信的命名规范没统一,这次的是"Red Packet"(Packet的“P”是大写)
所以应该把控件的字母全部都转化为小写再比较
elif "红包" in list_item_control.Name or "red packet" in list_item_control.Name.lower():
新增获取指定聊天窗口的聊天记录,并按时间信息分组的功能
在处理聊天记录时,我发现更多时候我们并不知道需要获取多少条聊天记录,而是需要获取一个时间节点的消息,如昨天的消息
所以我新增了一个方法
get_dialogs_by_time_blocks
,会以时间块来分区聊天记录,返回嵌套列表,元素是一串以时间消息分割的消息列表,例如:这样处理聊天记录时更方便了