我想索引Google Chrome中的所有用户操作和网站.据我所知,谷歌chrome索引sqlLite数据库中的所有数据.我如何以编程方式访问我自己的应用程序中的chrome Web历史记录
我正在开发一个需要chrome浏览器历史记录的应用程序。我已经编写了用于获取历史记录的C#代码。但是,我的代码中有两个我无法弄清楚的问题。
警告1正在构建的项目“ MSIL”的处理器体系结构与引用“ System.Data.SQLite”,“ AMD64”的处理器体系结构之间不匹配。这种不匹配可能会导致运行时失败。请考虑通过Configuration Manager更改项目的目标处理器体系结构,以使项目和引用之间的处理器体系结构保持一致,或者依赖具有与项目目标处理器体系结构相匹配的处理器体系结构的引用来进行依赖。ChromeData
SQLite错误(5):数据库已锁定
我尝试关闭浏览器,但仍然存在此错误。但是,当我创建历史记录文件的副本并将其重命名时,给出其路径而不是历史记录,程序正在运行,并且可以读取文件并获取数据。我无法弄清楚错误在哪里。所以,请帮忙。我正在发布我的3个班级文件。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data.SQLite;
using System.Data;
namespace ChromeData
{
class GoogleChrome
{
public List<URL> Urls = new List<URL>();
public IEnumerable<URL> GetHistory()
{
string DocumentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
//Console.WriteLine(DocumentsFolder);
string[] tempstr = DocumentsFolder.Split('\\');
foreach(string s in tempstr)
{
Console.WriteLine(s);
}
string tempstr1 = "";
DocumentsFolder += "\\Google\\Chrome\\User Data\\Default";
if(tempstr[tempstr.Length-1] != "Local")
{
for(int i =0; i<tempstr.Length-1;i++)
{
tempstr1 += tempstr[i] + "\\";
}
DocumentsFolder …Run Code Online (Sandbox Code Playgroud)