
Save the CSV file you want to import as history.csv in your desktop.Copy the code bellow and save it to a file named importhistory.py in your desktop.In order to analyze the data, we are going to import it into Chrome. Importing a fresh history to a clean Chrome 14:25:56,"""What Will a Civilization a Million Years Ahead of Earth Look Like?""" 14:25:54, Sagan Quote: All civilizations become either spacefaring or extinct. Once you have exported the data, you should end up with a CSV (Comma Separated Values) file that looks a bit like this one. I haven't tested this because I don't use Windows. If you want to get the browser history from a windows browser there are some tools that can help you. Paste this ~/Library/Safari/, and you'll see the History DB file there.ĭatetime( moz_historyvisits. While the file open dialog is open, press Cmd+Shft+G, you will see the Go To Dialog. Open that file with sqliteBrowser, your OSX file open dialog probably will not show the ~/Library directory, that's Apple trying to protect you from yourself.The file containing your Safari history is in ~/Library/Safari/History.db.
Download the sqliteBrowser dmg for osx. So this means that you can use any sqlite database viewer to open those files and inspect them. It's an embedded database system that is often found in apps. Turns out that all browsers, Firefox, Chrome and Safari all keep their histories in a sqlite database. So we have to get our hands dirty and hack it out of the browser.īut I found that there's another way to do it, takes a few steps but it's rather easy. AFAIK, Apple doesn't currently offer extensions to export data from its browser. Safari is a little trickier than other browsers. Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up. You can work around this by either using the terminal (my preferred method) or by using the Cmd+ Shft+ G in Finder. It tries to protect us from ourselves by hiding some system and application-specific files. The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history.