这是我的代码
import sqlite3
conn = sqlite3.connect("path to chrome history")
c = conn.cursor()
c.executemany("UPDATE urls SET url = REPLACE(url,.foo.,.foo-bar.) WHERE url LIKE %foo%;")
conn.close()
它会抛出以下错误:
c.executemany("UPDATE urls SET url = REPLACE(url,.foo.,.foo-bar.) WHERE url LIKE %foo%;")
TypeError: executemany expected 2 arguments, got 1
如何在Python中使用Sqlite3更改Google Chrome中的历史记录?
1条答案
按热度按时间jv2fixgn1#
午餐后我有一些时间来看这个,这就是我蹒跚在一起的东西。使用风险自负(在运行此命令之前备份“历史”文件)。
注意:Chrome必须关闭才能运行,否则文件将被锁定。