【问题标题】:Query to retrieve messages from Skype conversation from SQLite database查询以从 SQLite 数据库中检索来自 Skype 对话的消息
【发布时间】:2019-09-09 21:12:30
【问题描述】:

我正在尝试从 Skype 消息中获取对话,但新版本的 Skype 将数据库文件的路径及其结构更改为 JSON。

我下载了“DB Browser for SQLite”来查询数据库的内容。

【问题讨论】:

  • 你的问题是什么?
  • 我对其解决方案提出疑问,谢谢
  • @PabloAlmaguer 下次您想回答自己的问题时的提示(积极鼓励):在 Ask a question 页面的最底部(在“ 发布您的问题”按钮),有一个复选框“回答您自己的问题”。正如this help page 所描述的,单击此按钮将允许您立即添加答案,以便同时发布两者。

标签: sqlite skype


【解决方案1】:

Skype 数据库文件的新路径:%localappdata%\Packages\Microsoft.SkypeApp_kzf8qxf38zg5c\LocalState\<Skype Name>.db

这是一个从 JSON 结构中提取消息数据的查询示例

select creator,
       compose_time,
       msg_content,
       original_arrival_time
  from (select json_extract(msg.nsp_data, '$.creator') as "creator",
              json_extract(msg.nsp_data, '$._serverMessages[0].composetime') as "compose_time",
              json_extract(msg.nsp_data, '$._serverMessages[0].content') as "msg_content",
              json_extract(msg.nsp_data, '$._serverMessages[0].originalarrivaltime') as "original_arrival_time"
        from messagesv12 msg)
 where 1=1
   --and strftime('%Y%m%d', compose_time) > strftime('%Y%m%d', date('now'), '-4 day')
   --and creator = ''
 order by compose_time;

你可以在https://database.guide/json_extract-return-data-from-a-json-document-in-mysql/阅读json_extract()函数的文档

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-03
    • 2013-10-19
    • 2016-11-11
    • 2012-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-24
    相关资源
    最近更新 更多