from bs4 import BeautifulSoup
data = """
<div id='theDiv'>
    <p>div content</p>
    <p>div stuff</p>
    <p>div thing</p>
</div>
"""
soup = BeautifulSoup(data)
Get contents of div by id with BeautifulSoup