[Tutor] Parsing html user HTMLParser

ទិត្យវិរៈ titvirak at khmeros.info
Thu Apr 20 09:56:23 CEST 2006


Hi folks,

I need help here, I'm struggling with html parsing method, up until now
I can only put and html file as instance. I have no experience with
this, I want to read the childs inside this document and modify the
data. What can I do if I start from here?

> from HTMLParser import HTMLParser
>
> p = HTMLParser()
> s = open('/home/virak/Documents/peace/test.html').read()
> p.feed(s)
>
> print p
>
> p.close()
Titvirak


More information about the Tutor mailing list