ã¨ããããåºåãããã®ã <html> <head> <title>ã¤ããã¦ã£ã©ã¾ããã©</title> </head> <body> <h1>Django!!</h1> </body> </html> åºåããããã°ã©ã # vim: fileencoding=utf8 from lxml import etree from StringIO import StringIO broken_html = "<head><title>ã¤ããã¦ã£ã©ã¾ããã©<body><h1>Django!!</html>" parser = etree.HTMLParser() et = etree.parse(StringIO(broken_html), parser) print etree.tostring(et.getroot(), 'utf-8', pretty_print=True) ããã«æåã
{{#tags}}- {{label}}
{{/tags}}