How can i get the <text> tag from an html document using beautiful soup for Abbot lab 10k filing
I want to extract tag names of all children of <text></text> tag using below code
from bs4 import BeautifulSoup
import urllib.request
url ='https://www.sec.gov/Archives/edgar/data/1800/000104746919000624/a2237733z10-k.htm'
htmlpage = urllib.request.urlopen(url)
soup = BeautifulSoup(htmlpage, "html.parser")
all_text = soup.find('text')
all_tags = all_text.contents
all_tags = [x.name for x in all_tags if x.name is not None]
print(all_tags)
but some how the output i am getting for the above code is ['html'].
Expected output:
['p','p','p','p','p','p','div','div','font','font', etc......]