title: BeautifulSoup: Get the class text
body: <p>Assuming that the following code:</p>
  
  <pre><code>for data in soup.findAll('div',{'class':'value'}):
      print(data)
  </code></pre>
  
  <p>gives the following output:</p>
  
  <pre><code>&lt;div class="value"&gt;
  &lt;p class="name"&gt;Michael Jordan&lt;/p&gt;
  &lt;/div&gt;
  
  
  &lt;div class="value"&gt;
  &lt;p class="team"&gt;Real Madrid&lt;/p&gt;
  &lt;/div&gt;
  
  
  &lt;div class="value"&gt;
  &lt;p class="Sport"&gt;Ping Pong&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to create the following dictionary:</p>
  
  <pre><code>  Person = {'name': 'Michael Jordan', 'team': 'Real Madrid', 'Sport': 'Ping Pong'}
  </code></pre>
  
  <p>I can get the text using <code>data.text</code> but how can I get the text of the <code>class</code> in order to name the <code>keys</code> of the dictionary(Person[key1],Person[key2] ...)?</p>