title: Extracting text between tags using BeautifulSoup
body: <p>I am trying to extract text from a series of webpages that all follow a similar format using BeautifulSoup. The html for the text I wish to extract is below. The actual link is here: <a href="http://www.p2016.org/ads1/bushad120215.html" rel="nofollow">http://www.p2016.org/ads1/bushad120215.html</a>. </p>
  
  <pre><code> &lt;p&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;font size="-1"&gt;      &lt;span
   style="font-family: Arial;"&gt;&lt;big&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;/big&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;font size="-1"&gt;&lt;span style="font-family: Arial;"&gt;&lt;big&gt;&lt;span
   style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;/big&gt;&lt;/span&gt;&lt;/font&gt;&lt;font
   size="-1"&gt;&lt;span style="font-family: Arial;"&gt;&lt;big&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;/big&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size="-1"&gt;&lt;span style="font-family: Arial;"&gt;&lt;big&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;&lt;/span&gt;&lt;/big&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;   &lt;p&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;[Music]&lt;/span&gt;&lt;span
   style="text-decoration: underline;"&gt;&lt;br&gt;
  &lt;/span&gt;&lt;/p&gt;
  &lt;p&gt;&lt;small&gt;&lt;span style="text-decoration: underline;"&gt;TEXT&lt;/span&gt;: The
  Medal of Honor is the highest award for valor in action against an
  enemy force&lt;/small&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br&gt;
  &lt;/span&gt;&lt;/p&gt;
  &lt;p&gt;&lt;span style="text-decoration: underline;"&gt;Col. Jay Vargas&lt;/span&gt;:&amp;nbsp;
  We
  were
  completely
  surrounded,
  116 Marines locking heads with 15,000
  North Vietnamese.&amp;nbsp; Forty hours with no sleep, fighting hand to
  hand.&lt;span style="text-decoration: underline;"&gt;&lt;br&gt;
  &lt;span style="font-family: helvetica,sans-serif;"&gt;&lt;br&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>I'd like to find a way to iterate through all the html files in my folder and extract the text between all the markers. I've included here the relevant sections of my code:</p>
  
  <pre><code>text=[]
  
  for page in pages:
          html_doc = codecs.open(page, 'r')
          soup = BeautifulSoup(html_doc, 'html.parser')
          for t in soup.find_all('&lt;p&gt;'):
              t = t.get_text()
              text.append(t.encode('utf-8'))
              print t
  </code></pre>
  
  <p>However, nothing is coming up. Apologies for the noob question and thanks in advance for your help. </p>