Live data from Hacker News

Analyzing Your Browser History Using Python and Pandas

applecrazy.github.io

41–42 of 42 posts

Re: Analyzing Your Browser History Using Python and Pandas

#41
Awesome first content post, man! I like yours better than mine: https://andythemoron.com/blog/2017-03-12/Scraping-For-Fun-An...

One note you may want to add (or step you may want to tweak) is that the initial sqlite3 command won’t work if chrome is currently open. I just copied the History folder to somewhere else and did the same thing, as per the superuser thread you helpfully linked to.

Re: Analyzing Your Browser History Using Python and Pandas

#42
post #8

It seems a bit odd to export the data in the command line to then work with it in pandas, given that it's a stock sqlite3 database. I'd just use sqlite3.connect and pd.read_sql_query directly. (I know, the db will be locked when Chrome is running, but you can always shutil.copy it to a temp location.)

Hmm something to keep in mind for next week’s post.

Had the same idea with issuing the sqlite query directly from python. Unfortunately the browser has to be closed in that case, so I just copied the sqlite "History" file to temp location: https://github.com/davidgengenbach/chrome_history
Post reply on HN