Skip to content

Instantly share code, notes, and snippets.

@pranscript
Last active December 20, 2020 22:42
Show Gist options
  • Save pranscript/1745367ea12c2b1c42b5561ea45c4be0 to your computer and use it in GitHub Desktop.
Save pranscript/1745367ea12c2b1c42b5561ea45c4be0 to your computer and use it in GitHub Desktop.
Find Unique Websites visited through Chrome Browser on Windows

Prerequisite

  1. https://www.sqlite.org/download.html // Precompiled binaries with .exe file
  2. Get your history file from chrome folder // C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\History
  3. Put the contents in same folder.
  4. Add this path to environment variables.

Command

1) sqlite3 // enters sqlite3 
2) .open History
3) .headers on
4) .mode csv
5) .output url.csv
6) select datetime(last_visit_time/1000000-11644473600,'unixepoch') as 'lastVisited',* from  urls;

Excel

// Paste the following code in the empty cell of the first row, and "double click" the + sign to copy the formula to all cells in the column.

=IF(ISERROR(FIND("//www.",C2)),MID(C2,FIND(":",C2,4)+3,FIND("/",C2,9)-FIND(":",C2,4)-3),MID(C2,FIND(":",C2,4)+7,FIND("/",C2,9)-FIND(":",C2,4)-7))

Notepad

// Copy the column and paste in notepad

  1. Edit -> Line Operations -> Sort lines lexicograpgically
  2. Edit -> Line operations -> Remove consecutive Duplicate lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment