Created
May 5, 2014 00:25
-
-
Save sergueif/1855c538d0a2249125ef to your computer and use it in GitHub Desktop.
All domains visited by Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#some bash first | |
#Get Chrome history file here: http://www.chromium.org/user-experience/user-data-directory | |
#sqlite3 /PATH/TO/History "select datetime(last_visit_time/1000000-11644473600,'unixepoch'),url from urls order by last_visit_time desc" > history_export.txt | |
f = File.open('./history_export.txt') | |
e = f.each_line.lazy.map do |l| | |
next if l =~ /\|file:/ | |
next if l =~ /\|chrome-extension:/ | |
next if l =~ /\|mailto:/ | |
s = l[%r[\|https?://(.*)],1].to_s[%r[(.*?)/],1] | |
raise l if s.nil? | |
s | |
end.to_a.compact.sort.uniq | |
e.each(&method(:puts)) | |
puts e.size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment