I'm trying to extract a number from below HTML code, however I'm recieving the whole class or further rows starting with <div every time I try to use .find function.
My code:
ratescointeiner = checkinscontainer.find('div',class_='caps')
HTML chunk:
<div class="caps" data-rating="2">
<div class="cap cap-100"></div>
<div class="cap cap-100"></div>
<div class="cap"></div>
<div class="cap"></div>
<div class="cap"></div>
</div>
is there a possibility to extract the value of this data-rating attribute only?
 
     
     
    