sacha rook wrote:
> Hi
>  
> when I run this code on a winxp box I get a nice list of url's
> when I run this code on a win VISTA box I get this
>  
>  
>     print urlparse.urlparse(href)[1]
> TypeError: 'module' object is not callable

Please show the whole traceback.

Kent

>  
> can a. someone tell me why & b. how do i get rid of this condition 
> before I throw vista away :)
>  
> Many thanks in advance
>  
> S
>  
>  
> [CODE]
>  
> from BeautifulSoup import BeautifulSoup
> doc = ['<html><head><title>Page title</title></head>',
>        '<body><p id="firstpara" align="center">This is paragraph 
> <b>one</b>.',
>        '<p id="secondpara" align="blah">This is paragraph <b>two</b>.',
>        '<a href="http://www.google.co.uk";></a>' 
> <http://www.google.co.uk";></a>'>,
>        '<a href="http://www.bbc.co.uk";></a>' <http://www.bbc.co.uk";></a>'>,
>        '<a href="http://www.amazon.co.uk";></a>' 
> <http://www.amazon.co.uk";></a>'>,
>        '<a href="http://www.redhat.co.uk";></a>' 
> <http://www.redhat.co.uk";></a>'>,   
>        '</html>']
> soup = BeautifulSoup(''.join(doc))
> blist = soup.findAll('a')
> print blist
> import urlparse
> for a in blist:
>     href = a['href']
>     print urlparse.urlparse(href)[1]
>  
>  
> [/CODE]
> 
> ------------------------------------------------------------------------
> Are you the Quizmaster? Play BrainBattle with a friend now! 
> <http://specials.uk.msn.com/brainbattle>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to