Regex Help

Miki miki.tebeka at
Tue Sep 23 10:57:17 CEST 2008


> Anybody know of a good regex to parse html links from html code?
BeautifulSoup is *the* library to handle HTML

from BeautifulSoup import BeautifulSoup
from urllib import urlopen

soup = BeautifulSoup(urlopen(""))
for a in soup("a"):
    print a["href"]

Miki <miki.tebeka at>

More information about the Python-list mailing list