[GH-ISSUE #54] Link Parsing: Add support for browser history SQLite database #3057

Closed
opened 2026-03-14 20:49:52 +03:00 by kerem · 4 comments
Owner

Originally created by @pirate on GitHub (Nov 10, 2017).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/54

This will allow people to run BA as an archiver for all their browsing history, not just bookmarked pages.

h/t to @FiloSottile for the suggestion

Originally created by @pirate on GitHub (Nov 10, 2017). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/54 This will allow people to run BA as an archiver for **all** their browsing history, not just bookmarked pages. h/t to @FiloSottile for the suggestion
kerem closed this issue 2026-03-14 20:49:58 +03:00
Author
Owner

@pirate commented on GitHub (Jun 10, 2018):

Turns out it's really easy:

# Google Chrome / Chromium
# $1 default = ~/Library/Application Support/Google/Chrome/Default/History

cp "$1" .chrome_history.db.tmp
sqlite3 .chrome_history.db.tmp "SELECT \"[\" || group_concat(json_object('timestamp', last_visit_time, 'description', title, 'href', url)) || \"]\" FROM urls;" > downloads/chrome_history.json
rm .chrome_history.db.tmp

# Firefox
# $1 default =  ~/Library/Application\ Support/Firefox/Profiles/abc.default/places.sqlite
cp "$1" .firefox_history.db.tmp
sqlite3 .chrome_history.db.tmp "SELECT \"[\" || group_concat(json_object('timestamp', last_visit_date, 'description', title, 'href', url)) || \"]\" FROM moz_places;" > downloads/firefox_history.json
rm .firefox_history.db.tmp
<!-- gh-comment-id:396091782 --> @pirate commented on GitHub (Jun 10, 2018): Turns out it's really easy: ```bash # Google Chrome / Chromium # $1 default = ~/Library/Application Support/Google/Chrome/Default/History cp "$1" .chrome_history.db.tmp sqlite3 .chrome_history.db.tmp "SELECT \"[\" || group_concat(json_object('timestamp', last_visit_time, 'description', title, 'href', url)) || \"]\" FROM urls;" > downloads/chrome_history.json rm .chrome_history.db.tmp # Firefox # $1 default = ~/Library/Application\ Support/Firefox/Profiles/abc.default/places.sqlite cp "$1" .firefox_history.db.tmp sqlite3 .chrome_history.db.tmp "SELECT \"[\" || group_concat(json_object('timestamp', last_visit_date, 'description', title, 'href', url)) || \"]\" FROM moz_places;" > downloads/firefox_history.json rm .firefox_history.db.tmp ```
Author
Owner

@pirate commented on GitHub (Jun 11, 2018):

This is done. On master you can now run:

./bin/export-browser-history --chrome
./archive output/sources/chrome_history.json
# OR
./bin/export-browser-history --firefox
./archive output/sources/firefox_history.json
<!-- gh-comment-id:396103409 --> @pirate commented on GitHub (Jun 11, 2018): This is done. On master you can now run: ```bash ./bin/export-browser-history --chrome ./archive output/sources/chrome_history.json # OR ./bin/export-browser-history --firefox ./archive output/sources/firefox_history.json ```
Author
Owner

@GlassedSilver commented on GitHub (Apr 20, 2020):

So since I run this in a docker on my server that is running Linux (unRAID to be precise) and my desktop being Windows what I have is a places.sqlite file in my Windows Firefox's profile folder.

I know that I can rsync it to my server, but how would I pass the sqlite file to Linux then? Your example assumes a .db file and probably default paths for running ArchiveBox on a Linux Desktop where the Firefox installation also resides?

Also, is there possibly any way to treat a history with a different level of care than separately passed pages? Like bookmarks I wanna frequently save new versions of, history I mostly care about saving once or maybe a few times per year. Reason is I wanna keep storage usage a bit in check as well as run times.

Sorry to break open an old issue, but this seems pretty relevant, happy to post in a separate issue if deemed necessary though. :) Thanks a lot for building this application by the way! <3

<!-- gh-comment-id:616409612 --> @GlassedSilver commented on GitHub (Apr 20, 2020): So since I run this in a docker on my server that is running Linux (unRAID to be precise) and my desktop being Windows what I have is a places.sqlite file in my Windows Firefox's profile folder. I know that I can rsync it to my server, but how would I pass the sqlite file to Linux then? Your example assumes a .db file and probably default paths for running ArchiveBox on a Linux Desktop where the Firefox installation also resides? Also, is there possibly any way to treat a history with a different level of care than separately passed pages? Like bookmarks I wanna frequently save new versions of, history I mostly care about saving once or maybe a few times per year. Reason is I wanna keep storage usage a bit in check as well as run times. Sorry to break open an old issue, but this seems pretty relevant, happy to post in a separate issue if deemed necessary though. :) Thanks a lot for building this application by the way! <3
Author
Owner

@pirate commented on GitHub (Aug 18, 2020):

@GlassedSilver sorry I forgot to get back to this. If you still want help I recommend opening a new issue, happy to assist with making the bookmark transfer easy!

<!-- gh-comment-id:675212228 --> @pirate commented on GitHub (Aug 18, 2020): @GlassedSilver sorry I forgot to get back to this. If you still want help I recommend opening a new issue, happy to assist with making the bookmark transfer easy!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#3057
No description provided.