Skip to content

Commit

Permalink
Added feature to analyze history without closing chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
sank8dalvi committed Sep 13, 2020
1 parent c947836 commit e465f96
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion HistoryAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import operator
from collections import OrderedDict
import matplotlib.pyplot as plt
import shutil

def parse(url):
try:
Expand Down Expand Up @@ -33,7 +34,14 @@ def analyze(results):
data_path = os.path.expanduser('~')+"\AppData\Local\Google\Chrome\User Data\Default"
files = os.listdir(data_path)

history_db = os.path.join(data_path, 'history')
# path to user's temp files
temp_path = os.path.expanduser('~')+"\AppData\Local\Temp"

# create a copy of history database in temp
shutil.copyfile(os.path.join(data_path, 'History'),os.path.join(temp_path,'History.db'))

# connect to the copy of history database
history_db = os.path.join(temp_path,'History.db')

#connection
c = sqlite3.connect(history_db)
Expand Down

0 comments on commit e465f96

Please sign in to comment.