Hi,
import urllib
from BeautifulSoup import BeautifulSoup
page = urllib.urlopen(url) # url is the page address, if you are reading
a file in your hard drive you could use just open(filename) too, and no
needing to urllib
soup = BeautifulSoup(page)
#links = [str(link) for link in soup.findAll('a')]
links = soup.findAll('a')
I have used list compherension, comment outed line, because findAll
function returns a different type specific to BeautifulSoup. First line,
list compherension used converts every link to string.
Happy coding...
--
Sönmez Kartal
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor