编程接取谷歌Chrome浏览器历史记录 [英] Programmatically acess Google chrome history
本文介绍了编程接取谷歌Chrome浏览器历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想指数在谷歌浏览器的所有用户行为和网站。据我所知,谷歌浏览器指数都在sqlLite数据库中的数据。如何以编程方式访问Chrome网上应用历史,在我自己的应用程序
I want to index all the user actions and websites in google chrome. i understand that google chrome index all the data in sqlLite database. how can i Programmatically access the chrome web history in my own application
推荐答案
您需要从的SqLite下载页面
一旦你添加一个引用到SQLite的组件,它非常类似于标准ADO.net
Once you add a reference to the SQLite assembly, its very similar to standard ADO.net
所有的用户历史记录存储在位于下方
All the user history is stored in the History database located at the path in the connection string below
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());
}
这篇关于编程接取谷歌Chrome浏览器历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文