[lxml-dev] clean_html

Francesco cattafra at hotmail.com
Wed Jun 24 14:46:40 CEST 2009


Thank you very much for your answers!

The html string is read from a file with:
inputfile = "test.txt"
# where test.txt contains "<title>My site &raquo; Homepage</title>"
input = open(inputfile, "rb")
html = input.read()

How could I define the encoding for html?

Thanks,

Francesco



More information about the lxml-dev mailing list