Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Work with Netscape Bookmark File Format on Python?

My Chrome bookmark is too messy. So I export it, and decided to write a Python Program to clean my bookmark. For example: Sort them by the keyword.

I found Beautiful Soup. But the problem is, the export file is using Netscape Bookmark File Format, not standard XML. Beautiful Soup will try to convert them to standard XTML format. Chrome will unable to read it.

Is there another solution?

like image 866
比尔盖子 Avatar asked Jun 22 '26 05:06

比尔盖子


1 Answers

By default, Chrome stores your bookmarks as JSON, for example at:

C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\Bookmarks

For Linux users:

~/.config/chrome/Default/Bookmarks

(The location of this file will vary depending on your platform of course.)

You might find this file easier to manipulate than an HTML export.

like image 97
John McCollum Avatar answered Jun 23 '26 18:06

John McCollum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!