I selected a content from soup, there are three types.
<p>first</p><p><span>first</span></p><p>first<span>second</span>third</p>
And I want to get text from the last in order like "first", "second", "third". First, I use '.text' and the last one returned "firstsecondthird". But I want to get text one by one. Is there a way?
I edited question so you can get more detail information.
contents_list = soup.select('blabla')
# contents_list =
# ['<p>first</p>',
# '<p><span>first</span></p>',
# '<p>first<span>second</span>third</p>']
for content in contents_list:
print(content.text)
# I want to get
# first
# first
# first, second, third