MCPcopy Index your code
hub / github.com/rawpython/remi / SimpleParser

Class SimpleParser

test/html_validator.py:6–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4 from HTMLParser import HTMLParser
5
6class SimpleParser(HTMLParser):
7 def __init__(self):
8 HTMLParser.__init__(self)
9 self.elements = []
10
11 def handle_starttag(self, tag, attrs):
12 self.elements.append((tag, dict(attrs)))
13
14def assertValidHTML(text):
15 h = SimpleParser()

Callers 3

assertValidHTMLFunction · 0.85
test_initMethod · 0.85
test_initMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_initMethod · 0.68
test_initMethod · 0.68