Using Beautiful Soup to entangle bookmarks.html

George Sakkis george.sakkis at gmail.com
Fri Sep 8 19:02:59 EDT 2006


Francach wrote:
> Hi George,
>
> Firefox lets you group the bookmarks along with other information into
> directories and sub-directories. Firefox uses header tags for this
> purpose. I'd like to get this grouping information out aswell.
>
> Regards,
> Martin.

Here's what I came up with:
http://rafb.net/paste/results/G91EAo70.html. Tested only on my
bookmarks; see if it works for you.

For each subfolder there is a recursive call that walks the respective
subtree, so it's probably not the most efficient solution, but I
couldn't think of any one-pass way to do it using BeautifulSoup.

George




More information about the Python-list mailing list