title: Python Beautiful Soup: How to extract text next to a tag?
body: <p>I have following HTML</p>
  
  <pre><code>&lt;p&gt;
  &lt;b&gt;Father:&lt;/b&gt; Michael Haughton
  &lt;br&gt;
  &lt;b&gt;Mother:&lt;/b&gt; Diane
  &lt;br&gt;&lt;b&gt;Brother:&lt;/b&gt; 
  Rashad Haughton&lt;br&gt;
  &lt;b&gt;Husband:&lt;/b&gt; &lt;a href="/people/540/000024468/"&gt;R. Kelly&lt;/a&gt; (m. 1994, annulled that same year)
  &lt;br&gt;&lt;b&gt;Boyfriend:&lt;/b&gt; &lt;a href="/people/420/000109093/"&gt;Damon Dash&lt;/a&gt; (Roc-a-Fella co-CEO)&lt;br&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I have to separate heading and text, for instance, <em>Mother</em>: <strong>Diane</strong>..</p>
  
  <p>So in the end I would have a list of dictionaries as:</p>
  
  <pre><code>[{"label":"Mother","value":"Diane"}]
  </code></pre>
  
  <p>I was trying the below but not working:</p>
  
  <pre><code>def parse(u):
      u = u.rstrip('\n')
      r = requests.get(u, headers=headers)
      if r.status_code == 200:
          html = r.text.strip()
          soup = BeautifulSoup(html, 'lxml')
          headings = soup.select('table p')
          for h in headings:
              b = h.find('b')
              if b is not None:
                  print(b.text)
                  print(h.text + '\n')
                  print('=================================')
  
  
  url = 'http://www.nndb.com/people/742/000024670/'
  </code></pre>