Python 3 HTML Parse

Wednesday, 13 April 2011, 557

Sample code for HTML parsing with Python 3.

>>> from html.parser import HTMLParser
>>> parss=HTMLParser()
>>> parss.feed('<a href="http://m-eken.com">link</a>')
>>> parss.get_starttag_text()
'<a href="http://m-eken.com">'
>>>


Leave a comment
Name(required)
Mail (will not be publishing) (required)
Website