title: Using SoupStrainer to parse selectively
body: <p>Im trying to parse a list of video game titles from a shopping site. however as the item list is all stored inside a tag .</p>
  <p><a href="http://www.crummy.com/software/BeautifulSoup/documentation.html#Improving%20Performance%20by%20Parsing%20Only%20Part%20of%20the%20Document" rel="nofollow noreferrer">This</a> section of the documentation supposedly explains how to parse only part of the document but i cant work it out. my code:</p>
  <pre><code>from BeautifulSoup import BeautifulSoup
  import urllib
  import re
  
  url = &quot;Some Shopping Site&quot;
  html = urllib.urlopen(url).read()
  soup = BeautifulSoup(html)
  for a in soup.findAll('a',{'title':re.compile('.+') }):
      print a.string
  </code></pre>
  <p>at present is prints the string inside any  tag that has a not empty title reference. but it is also priting the items in the side bar that are the &quot;specials&quot;. if i can only take the product list div, i will kill 2 birds with one stone.</p>
  <p>Many thanks.</p>