- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLparser.py
More file actions
Latest commit
10 lines (8 loc) · 420 Bytes
/
Copy pathHTMLparser.py
File metadata and controls
10 lines (8 loc) · 420 Bytes
1
2
3
4
5
6
7
8
9
10
fromhtml.parserimportHTMLParser
classMyhtmlparser(HTMLParser):
defhandle_starttag(self, tag, attrs):
print(tag)
foreleinattrs:
print('->',ele[0],'>',ele[1])
parser=Myhtmlparser()
parser.feed('<head><title>HTML</title></head><object type="application/x-flash"data="your-file.swf"width="0" height="0"><!-- <param name="movie" value="your-file.swf" /> --><param name="quality" value="high"/></object>')