from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init(self)
self.result = list()
def handle_date(self, data):
if data is not None:
self.result.append(data)
obj = MyHTMLParser()
obj.feed(html)
print ' '.join(obj.result)
댓글 없음:
댓글 쓰기