Using C#, I need to get all Firefox bookmarks for importing them into our database. How can I do this?
I’m aware of the SO question, Read FF 3 bookmarks in Java, but the answers there all seem to revolve around Java database drivers, and I’m not sure that some of those answers aren’t Java-specific.
My primary question is, “How can I read Firefox bookmarks in C#?”
Secondary questions: I see \%user profile%\application data\mozilla\firefox\profiles\bookmarkbackups\bookmarks-[date].json files — can I just parse that? If so, are there any existing parsers for that?
Rhetorical lamenting question: Why can’t this be as easy as IE, where I just read the .url files in \%user profile%\favorites? Bah.
Use the SQLite driver for .Net and access the file places.sqlite it can be found at
Application Data/Mozilla/Firefox/Profiles/$this_varies/places.sqliteon my computer. It should not be hard for you to locate on your target computers.
Edit 1:
Here is a snip of code that prints out urls from the database:
Edit 2:
As tip. I really must recommend the SQLite Manager plugin for firefox. It’s very useful for working with sqlite databases.