I am trying to get a list of all html tags from a wonderful soup.
I see everything, but I need to know the tag name before searching.
If there is text, for example
html = """<div>something</div> <div>something else</div> <div class='magical'>hi there</div> <p>ok</p>"""
How do I get a list, for example
list_of_tags = ["<div>", "<div>", "<div class='magical'>", "<p>"]
I know how to do this with regex, but I'm trying to learn BS4
source share