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/
"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
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
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
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.
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?
> > > >
> > >
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.
> >
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
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
; > 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
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
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%
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
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
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
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
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
"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
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
19 matches
Mail list logo