title: Extracting specific part of html
body: <p>I am working on a webscraper using html requests and beautiful soup (New to this). For 1 webpage (<a href="https://www.selfridges.com/GB/en/cat/beauty/make-up/?pn=1" rel="nofollow noreferrer">https://www.selfridges.com/GB/en/cat/beauty/make-up/?pn=1</a>) I am trying to scrape a part, which I will replicate for other products. The html looks like:</p>
  <pre><code>&lt;div class=&quot;plp-listing-load-status c-list-header__counter initialized&quot; data-page-number=&quot;1&quot; data-total-pages-count=&quot;57&quot; data-products-count=&quot;60&quot; data-total-products-count=&quot;3361&quot; data-status-format=&quot;{available}/{total} results&quot;&gt;60/3361 results&lt;/div&gt;
  </code></pre>
  <p>I want the scrape the &quot;57&quot; from the data-total-pages-count=&quot;57&quot;. I have tried using:</p>
  <pre><code>soup = BeautifulSoup(page.content, &quot;html.parser&quot;)
  nopagesstr = soup.find(class_=&quot;plp-listing-load-status c-list-header__counter initialized&quot;).get('data-total-pages-count')
  </code></pre>
  <p>and</p>
  <pre><code>nopagesstr = r.html.find('[data-total-pages-count]',first=True)
  </code></pre>
  <p>But both return <code>None</code>. I am not sure how to select the 57 specifically. Any help would be appreicated</p>