More Browser History Queries | David Bieber
Previously I listed out a few queries for poking at my browser history. Here are some more!
As before, I begin by making a copy of my browsing history and opening sqlite3:
cp ~/Library/Application\ Support/Google/Chrome/Default/History ~/my-history
sqlite3 ~/my-history
Once that’s done, we can start running the queries.
YouTube Videos Watched
select DISTINCT REPLACE(urls.title, " - YouTube", ""), urls.url
from urls
where urls.url like "%www.youtube.com/watch%"
limit 50;
YouTube Search Queries
select DISTINCT REPLACE(urls.title, " - YouTube", "")
from urls
where urls.url like "%www.youtube.com/results?search_query%"
limit 50;
Google Search Queries
select DISTINCT REPLACE(urls.title, " - Google Search", "")
from urls
where urls.url like "%www.google.com/search%"
limit 50;
Google Maps Usage
select DISTINCT REPLACE(urls.title, " - Google Maps", "")
from urls
where urls.url like "%www.google.com/maps%"
and urls.title != "Google Maps"
limit 50;
Wikipedia Browsing History
select DISTINCT REPLACE(urls.title, " - Wikipedia", "")
from urls
where urls.url like "%wikipedia.org/wiki/%"
limit 50;
GitHub Users and Orgs
select DISTINCT
SUBSTR(
urls.url,
LENGTH("https://github.com/") + 1,
INSTR(SUBSTR(urls.url, LENGTH("https://github.com/") + 1), "/") - 1
) as user
from urls
where urls.url like "https://github.com/%"
limit 50;
The rest of the GitHub queries ended up being quite messy, so I’ve placed them at the end of the document.
David Bieber