You are viewing a single comment's thread. Return to all comments →
from html.parser import HTMLParser class myhtmlparser(HTMLParser): def handle_starttag(self,tag,attrs): if not attrs: print(tag) if attrs: print(tag) for attr in attrs: print("->",attr[0],">",attr[1]) html="" for _ in range(int(input())): html+=input() parser=myhtmlparser() parser.feed(html)
Seems like cookies are disabled on this browser, please enable them to open this website
Detect HTML Tags, Attributes and Attribute Values
You are viewing a single comment's thread. Return to all comments →