title: Parsing a div with a "class" attribute
body: <p>Using the BeautifulSoup module in Python, I'm trying to parse this webpage below.</p>
  
  <pre><code>&lt;div class="span-body"&gt;&lt;div class="timestamp updated" title="2016-05-08T1231Z"&gt;May 8, 12:31 PM EDT&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to get the script below to return <code>2016-05-08T1231Z</code>, which is found in the second div with the <code>timestamp updated</code> class.</p>
  
  <pre><code>with open("index.html", 'rb') as source_file:
      soup = BeautifulSoup(source_file.read()) # Read the source file and get BeautifulSoup to work with it.
      div_1 = soup.find("div", {"class": "span-body"}).contents[0] # Parse the first div.
      div_2 = div_1("div", {"class": "timestamp updated"}) # Parse the second div.
      print div_2
  </code></pre>
  
  <p><code>div_1</code> returns what I wanted to return (the second div), but <code>div_2</code> isn't, instead it's only giving me an empty list in return.</p>
  
  <p>How can I fix this problem?</p>