title: Match the exact class in html <div> tags using BeautifulSoup
body: <p>I am using Beautiful Soup to scrape information from a website.</p>
  
  <p>Relevant code:</p>
  
  <pre><code>page_url = https://www.autotrader.co.uk/car-search?sort=sponsored&amp;radius=1500&amp;postcode=&amp;onesearchad=Used&amp;onesearchad=Nearly%20New&amp;onesearchad=New&amp;make=Vauxhall&amp;model=Corsa&amp;year-from=2008&amp;year-to=2010&amp;minimum-mileage=82376&amp;maximum-mileage=123564&amp;page=2
  
  page = urllib2.urlopen(page_url)
  
  soup = BeautifulSoup(page, 'html.parser')
  </code></pre>
  
  <p>Now I just want to print every price on the page that is within <code>&lt;div class="vehicle-price"&gt;&lt;/div&gt;</code> tags, for example:</p>
  
  <pre><code>&lt;div class="vehicle-price" data-label="search appearance click"&gt;\xa34,400&lt;/div&gt;
  </code></pre>
  
  <p>So I use:</p>
  
  <pre><code>for i in soup.select('div.vehicle-price'):
      print (i.string)
  </code></pre>
  
  <p>This works fine EXCEPT there are some <code>&lt;div&gt;</code> tags like this:</p>
  
  <pre><code>&lt;div class="vehicle-price physical-stock-mrrp" data-label="search 
  appearance click new car"&gt;
  </code></pre>
  
  <p>And the code still prints what is within these tags too.</p>
  
  <p>How can I tell Beautiful Soup that I only want the tag contents when <code>class="vehicle-price"</code> and not when <code>class="vehicle-price other-things-too"</code>?</p>