Nit*_*nil 6 c# sqlite google-chrome .net-3.5 browser-history
我想索引Google Chrome中的所有用户操作和网站.据我所知,谷歌chrome索引sqlLite数据库中的所有数据.我如何以编程方式访问我自己的应用程序中的chrome Web历史记录
kd7*_*kd7 10
您需要从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());
}
Run Code Online (Sandbox Code Playgroud)