我想在谷歌浏览器中索引所有用户操作和网站。我了解 google chrome 索引 sqlLite 数据库中的所有数据。我如何在我自己的应用程序中以编程方式访问 chrome 网络历史记录
您需要从以下位置下载适当的程序集SqLite 下载页面
添加对 SQLite 程序集的引用后,它与标准 ADO.net 非常相似
所有用户历史记录都存储在历史数据库中,该数据库位于下面的连接字符串中的路径中
SQLiteConnection conn = new SQLiteConnection
(@"Data Source=C:\Users\YourUserName\AppData\Local\Google\Chrome\User Data\Default\History");
conn.Open();
SQLiteCommand cmd = new SQLiteCommand();
cmd.Connection = conn;
// cmd.CommandText = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;";
// Use the above query to get all the table names
cmd.CommandText = "Select * From urls";
SQLiteDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
Console.WriteLine(dr[1].ToString());
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)