Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-21 Thread George Sakkis
robin wrote: > "George Sakkis" <[EMAIL PROTECTED]> wrote: > > >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. > > That URL is dead. Got another? Yeap, try this one: http://gsakkis-utils.googlecode.com/svn/trunk/

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-21 Thread robin
"George Sakkis" <[EMAIL PROTECTED]> wrote: >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. That URL is dead. Got another? - robin noisetheatre.blogspot.com -- http://mail.python.org/mailman/listinfo/python-lis

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-09 Thread Francach
Hallo George, thanks a lot! This is exactly the direction I had in mind. Your script demonstrates nicely how Beautiful Soup works. Regards, Martin. George Sakkis wrote: > Francach wrote: > > Hi George, > > > > Firefox lets you group the bookmarks along with other information into > > directories

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread George Sakkis
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://ra

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Paul Boddie
Francach wrote: > > 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. import libxml2dom # http://www.python.org/pypi/libxml2dom d = libxml2dom.

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Francach
into. > > > > I've been struggling with the documentation trying to figure out how to > > > > extract all the urls. Has anybody got a couple of longer examples using > > > > Beautiful Soup I could play around with? > > > > > > >

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread George Sakkis
I've been struggling with the documentation trying to figure out how to > > > extract all the urls. Has anybody got a couple of longer examples using > > > Beautiful Soup I could play around with? > > > > > > Thanks, > > > Martin. > >

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-08 Thread Francach
rying to use the Beautiful Soup package to parse through the > > "bookmarks.html" file which Firefox exports all your bookmarks into. > > I've been struggling with the documentation trying to figure out how to > > extract all the urls. Has anybody got a couple of l

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread George Sakkis
ls. Has anybody got a couple of longer examples using > Beautiful Soup I could play around with? > > Thanks, > Martin. from BeautifulSoup import BeautifulSoup urls = [tag['href'] for tag in BeautifulSoup(open('bookmarks.html')).findAll('a')] Regards, George -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Tim Williams
; > I've been struggling with the documentation trying to figure out how to > > extract all the urls. Has anybody got a couple of longer examples using > > Beautiful Soup I could play around with? > > > > Thanks, > > Martin. > > If the only thing yo

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Adam Jones
ls. Has anybody got a couple of longer examples using > Beautiful Soup I could play around with? > > Thanks, > Martin. If the only thing you want out of the document is the URL's why not search for: href="..." ? You could get a regular expression that matches that pr

Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Anthra Norell
got a couple of longer examples using > Beautiful Soup I could play around with? > > Thanks, > Martin. Martin, SE is a stream editor that does not introduce the overhead and complications of overkill parsing. See if it suits your needs: http://cheeseshop.python.org/pypi/SE/2.2%

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Diez B. Roggisch
waylan schrieb: > Diez B. Roggisch wrote: >> suppose it is well-formed, most probably even xml. > > Maybe not. Otherwise, why would there be a script like this one[1]? > Anyway, I found that and other scripts that work with firefox > bookmarks.html files with a quick search [2]. Perhaps you will f

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Claudio Grondi
tion trying to figure out how to >> extract all the urls. Has anybody got a couple of longer examples using >> Beautiful Soup I could play around with? > > > Why do you use BeautifulSoup on that? It's generated content, and I > suppose it is well-formed, most probably

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread waylan
Diez B. Roggisch wrote: > suppose it is well-formed, most probably even xml. Maybe not. Otherwise, why would there be a script like this one[1]? Anyway, I found that and other scripts that work with firefox bookmarks.html files with a quick search [2]. Perhaps you will find something there that i

Re: Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Diez B. Roggisch
ls. Has anybody got a couple of longer examples using > Beautiful Soup I could play around with? Why do you use BeautifulSoup on that? It's generated content, and I suppose it is well-formed, most probably even xml. So use a standard parser here, better yet somthing like lxml/elemen

Using Beautiful Soup to entangle bookmarks.html

2006-09-07 Thread Francach
Hi, I'm trying to use the Beautiful Soup package to parse through the "bookmarks.html" file which Firefox exports all your bookmarks into. I've been struggling with the documentation trying to figure out how to extract all the urls. Has anybody got a couple of longer examples

Re: Using Beautiful Soup

2006-08-18 Thread Jorge Godoy
"Tempo" <[EMAIL PROTECTED]> writes: > Heya. I have never used a module/script before, and the first problem I > have run into is that I do not know how to install a module/script. I > have downloaded Beautiful Soup, but how do I use it in one of my own > programs? I know that I use an "include" st

Using Beautiful Soup

2006-08-18 Thread Tempo
Heya. I have never used a module/script before, and the first problem I have run into is that I do not know how to install a module/script. I have downloaded Beautiful Soup, but how do I use it in one of my own programs? I know that I use an "include" statement, but do I first need to make a copy o