title: Python - BeautifulSoup - HTML Parsing
body: <p>Here is fragment of the site code</p>
  
  <pre><code>&lt;td class='vcard' id='results100212571'&gt;   
   &lt;h2 class="custom_seeMore"&gt;
    &lt;a class="fn openPreview" href="link.html"&gt;Hotel Name&lt;span class="seeMore"&gt;See More...&lt;/span&gt;&lt;/a&gt;
   &lt;/h2&gt; 
   &lt;div class='clearer'&gt;&lt;/div&gt; 
   &lt;div class='adr'&gt;
    &lt;span class='postal-code'&gt;00000&lt;/span&gt; 
    &lt;span class='locality'&gt;City&lt;/span&gt; 
    &lt;span class='street-address'&gt;Address&lt;/span&gt;
   &lt;/div&gt;
   &lt;p class="tel"&gt;Phone number&lt;/p&gt;
  </code></pre>
  
  <p>and I try to parse it</p>
  
  <pre><code>for element in BeautifulSoup(page).findAll('td'):
      if element.find('a', {'class' : 'fn openPreview'}):
          print element.find('a', {'class' : 'fn openPreview'}).string
      if element.find('span', {'class' : 'postal-code'}):
          print element.find('span', {'class' : 'postal-code'}).string
      if element.find('span', {'class' : 'locality'}):
          print element.find('span', {'class' : 'locality'}).string
      if element.find('span', {'class' : 'street-address'}):
          print element.find('span', {'class' : 'street-address'}).string
      if element.find('p', {'class' : 'tel'}):
          print element.find('p', {'class' : 'tel'}).string
  </code></pre>
  
  <p>I know it's very amateur code, but it almost works. ie it works for all classes except 'fn openPreview', all other classes draw their content, but</p>
  
  <pre><code>print element.find('a', {'class' : 'fn openPreview'}).string 
  </code></pre>
  
  <p>print None</p>
  
  <p>Please help me, how to parse it.</p>