python html

Walter Dörwald walter at
Fri Aug 19 15:27:53 CEST 2005

Steve Young wrote:

> Hi, I am looking for something where I can go through
> a html page and make change the url's for all the
> links, images, href's, etc... easily. If anyone knows
> of something, please let me know. Thanks.

You might try XIST (

Code might look like this:

from ll.xist import xsc, parsers

node = parsers.parseURL("", tidy=True)

for link in node//xsc.URLAttr:
    link[:] = unicode(link).replace(
print node.asBytes()

    Walter Dörwald

More information about the Python-list mailing list