Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet History Script For Google Chrome

I'm not looking for a "best" or most efficient script to do this. But I was wondering if there exists a script to pull Internet History for a day's time from, say, Google Chrome and log it to a txt file. I'd prefer if it were in Python or MATLAB.

If you guys have a different method using one of these languages utilizing locally stored browser history data from Google Chrome, I'd be all ears for that too.

I'd be super-thankful if anyone could help with this!

like image 577
black_bird Avatar asked Jan 09 '23 22:01

black_bird


1 Answers

From my understanding, it seems easy to be done. I don't know if this is what you want. Internet history from Chrome is stored at a specific path. Take Win7 for example, it's stored at win7: C:\Users\[username]\AppData\Local\Google\Chrome\User Data\Default\History

In Python:

f = open('C:\Users\[username]\AppData\Local\Google\Chrome\User Data\Default\History', 'rb')
data = f.read()
f.close()
f = open('your_expected_file_path', 'w')
f.write(repr(data))
f.close()
like image 116
Stephen Lin Avatar answered Jan 18 '23 06:01

Stephen Lin