title: Using BeautifulSoup to select div blocks within HTML
body: <p>I am trying to parse several div blocks using Beautiful Soup using some html from a website. However, I cannot work out which function should be used to select these div blocks. I have tried the following:</p>
  
  <pre><code>import urllib2
  from bs4 import BeautifulSoup
  
  def getData():
  
      html = urllib2.urlopen("http://www.racingpost.com/horses2/results/home.sd?r_date=2013-09-22", timeout=10).read().decode('UTF-8')
  
      soup = BeautifulSoup(html)
  
      print(soup.title)
      print(soup.find_all('&lt;div class="crBlock "&gt;'))
  
  getData()
  </code></pre>
  
  <p>I want to be able to select everything between <code>&lt;div class="crBlock "&gt;</code> and its correct end <code>&lt;/div&gt;</code>. (Obviously there are other div tags but I want to select the block all the way down to the one that represents the end of this section of html.)</p>