title: Get contents of div by id with BeautifulSoup
body: <p>I am using python2.7.6, urllib2, and BeautifulSoup</p>
  
  <p>to extract html from a website and store in a variable.</p>
  
  <p>How can I show just the html contents of a <code>div</code> with an id by using beautifulsoup?</p>
  
  <pre><code>&lt;div id='theDiv'&gt;
  &lt;p&gt;div content&lt;/p&gt;
  &lt;p&gt;div stuff&lt;/p&gt;
  &lt;p&gt;div thing&lt;/p&gt;
  </code></pre>
  
  <p>would be</p>
  
  <pre><code>&lt;p&gt;div content&lt;/p&gt;
  &lt;p&gt;div stuff&lt;/p&gt;
  &lt;p&gt;div thing&lt;/p&gt;
  </code></pre>