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
 
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 BeautifulSoupdoc = ['<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>',       
'<a href="http://www.bbc.co.uk";></a>',       '<a 
href="http://www.amazon.co.uk";></a>',       '<a 
href="http://www.redhat.co.uk";></a>',           '</html>']soup = 
BeautifulSoup(''.join(doc))blist = soup.findAll('a')print blist
import urlparsefor a in blist:    href = a['href']    print 
urlparse.urlparse(href)[1]
 
 
[/CODE]
_________________________________________________________________
Get free emoticon packs and customisation from Windows Live. 
http://www.pimpmylive.co.uk
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to