Created
March 12, 2011 15:54
-
-
Save paitonic/867328 to your computer and use it in GitHub Desktop.
parses chrome+firefox bookmarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BeautifulSoup import BeautifulSoup | |
f = open("chrome-fav.html","r") | |
html = f.read() | |
f.close() | |
soup = BeautifulSoup(html) | |
bookmarks = soup.findAll('a') | |
# attributes: href, add_date, icon etc. | |
# each['ATTRIBUTE'] | |
for each in bookmarks: | |
title = each.string | |
url = each['href'] | |
print "Title: " + title | |
print "Url: " + url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment