How to access Google Chrome browser history programmatically on local machine

后端 未结 6 687
無奈伤痛
無奈伤痛 2020-12-07 15:44

I want to write a simple program which shows my internet activity over a period of time (which site I visited, how many times and so on). I mostly use Google Chrome browser.

6条回答
  •  再見小時候
    2020-12-07 16:21

    There is an open source program called Hindsight (https://github.com/obsidianforensics/hindsight) that analyzes browsing history in Chrome. While the program is rather large and complicated, it access the various Chrome SQLite files using SQL queries, which can pull out and use independently, either in a SQLite browser or a different program.

    An example of one for the Chrome v30+ History database is:

    SELECT urls.id, urls.url, urls.title, urls.visit_count, urls.typed_count, urls.last_visit_time, urls.hidden, urls.favicon_id, visits.visit_time, visits.from_visit, visits.visit_duration, visits.transition, visit_source.source
    FROM urls JOIN visits ON urls.id = visits.url
    LEFT JOIN visit_source ON visits.id = visit_source.id
    

    There are many more SQL queries for different Chrome databases, as well as different versions of Chrome.

提交回复
热议问题