We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Detect HTML Tags, Attributes and Attribute Values
Detect HTML Tags, Attributes and Attribute Values
Sort by
recency
|
158 Discussions
|
Please Login in order to post a comment
from html.parser import HTMLParser
class MyHTMLParser(HTMLParser): def print_attrs(self,attrs): for name,value in attrs: print(f"-> {name} > {value if value is not None else 'None'}")
html = '\n'.join(input() for _ in range(int(input()))) MyHTMLParser().feed(html)