title: BeautifulSoup4 data extract from HTML5 data-* tag
body: <p>I want to extract just the inner text <strong>24,000.00</strong> from the following tag:</p>
  
  <pre><code>&lt;span class="itm-price mrs  "&gt;
       &lt;span data-currency-iso="BDT"&gt;৳&lt;/span&gt; 
       &lt;span dir="ltr" data-price="24000"&gt;24,000.00&lt;/span&gt; 
  &lt;/span&gt;
  </code></pre>
  
  <p>There are many similar tag like this in the page from where I want to extract data.</p>
  
  <p>I'm trying to do this:</p>
  
  <pre><code>    for price in soup.find_all('span', {'class': 'itm-price'}):
          item_price = price.get('data-price')
          print(item_price)
  </code></pre>
  
  <p>But Output is coming : <code>None</code></p>
  
  <p>I learned from the <code>Bs4 doc</code> that for html5 <code>data-*</code> tag we should use :</p>
  
  <pre><code>data_soup.find_all(attrs={"data-foo": "value"})
  # [&lt;div data-foo="value"&gt;foo!&lt;/div&gt;]
  </code></pre>
  
  <p>As I'm very newbie here so I'm still unable to bring resutls using the method. </p>