mirror of
https://github.com/LC044/WeChatMsg
synced 2024-11-14 22:01:54 +08:00
处理音频合并相同两行的情况
This commit is contained in:
parent
3d68f99780
commit
62febf63c7
@ -20,10 +20,13 @@ def merge_MediaMSG_databases(source_paths, target_path):
|
|||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
result = cursor.fetchall()
|
result = cursor.fetchall()
|
||||||
# 附加源数据库
|
# 附加源数据库
|
||||||
target_cursor.executemany(
|
try:
|
||||||
"INSERT INTO Media (Key,Reserved0,Buf,Reserved1,Reserved2)"
|
target_cursor.executemany(
|
||||||
"VALUES(?,?,?,?,?)",
|
"INSERT INTO Media (Key,Reserved0,Buf,Reserved1,Reserved2)"
|
||||||
result)
|
"VALUES(?,?,?,?,?)",
|
||||||
|
result)
|
||||||
|
except sqlite3.IntegrityError:
|
||||||
|
print("有重复key", "跳过")
|
||||||
cursor.close()
|
cursor.close()
|
||||||
db.close()
|
db.close()
|
||||||
# 提交事务
|
# 提交事务
|
||||||
|
Loading…
Reference in New Issue
Block a user