Skip to content Skip to sidebar Skip to footer

Extract Text From Html File With Beautifulsoup/python

Solution 2:

With a list of comprehension you could do the following :

names = soup.find_all("span",{"class":"toctext"})
print([x.text for x in names])

Post a Comment for "Extract Text From Html File With Beautifulsoup/python"