Add an additional loop and find all <p>
:
for i in all_bodies:
for p in i.find_all('p'):
print(p)
Or as alternativ use css selectors to avoid that additional loop:
for p in soup.select('section p'):
print(p)
Example with additional for loop
from bs4 import BeautifulSoup
html = '''
<section class="...">
<div>...</div>
<figure>...</figure>
<p id='...' class='...'></p>
<p id='...' class='...'></p>
<p id='...' class='...'></p>
</section>
<section class="...">
<div>...</div>
<figure>...</figure>
<p id='...' class='...'></p>
<p id='...' class='...'></p>
<p id='...' class='...'></p>
</section>
'''
soup = BeautifulSoup(html, 'lxml')
all_bodies = soup.find_all('section')
for i in all_bodies:
for p in i.find_all('p'):
print(p)
Output
<p class="..." id="..."></p>
<p class="..." id="..."></p>
<p class="..." id="..."></p>
<p class="..." id="..."></p>
<p class="..." id="..."></p>
<p class="..." id="..."></p>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…