title: How can I extract text and lists with BeautifulSoup
body: <h2>Start with BeautifulSoup I was using using SCRAPY to extract the <a href="https://www.oercommons.org/courses/randomized-synthesis-project" rel="nofollow noreferrer">OER</a> data but I have 3 problems with:</h2>
  
  <p><br />
  1. The <strong>amount</strong> of: visits, times saved .. because xpath used something like "/dl[2]/dd[2]/"</p>
  
  <ul>
  <li><p>with scrapy</p>
  
  <p><code>cant_visitas = response.xpath ("//// i [@ class = 'fa fa-eye'] / following-sibling :: span [1] / text ()"). extract_first ()</code></p></li>
  <li><p>with <strong>BeautifulSoup</strong> I can't extract the value (someone knows if it <strong>is possible</strong> to use a <strong>tag with spaces</strong>)</p>
  
  <p><code>cant_guardados = soup.find ('li', {'id': 'Number of saves'}) #. find ('span'). get_text ()</code></p></li>
  </ul>
  
  <p><br />
  2. And the <strong>lists</strong> as is the case of the degrees <strong>.getall()</strong> (with JSON TYPE return) in BeautifulSoup it seems that it is <strong>find_all</strong> only that I don't know how to do it because using xpath "everything is nested dl [2] / dd [3 ] "</p>
  
  <ul>
  <li><p>with scrapy</p>
  
  <p><code>degrees = response.xpath ('normalize-space (// div [@ class = "material-details"] / dl [2] / dd [3] / text ())'). getall ()</code></p></li>
  <li><p>with <strong>BeautifulSoup</strong></p>
  
  <p><code>degrees = soup.find ('div', 'material-details'). select ('dl: nth-of-type (2)&gt; dd: nth-of-type (3)')</code></p></li>
  </ul>
  
  <p><br />
  3. How could I extract the average value of the valuation, since it is found as an attribute of the div</p>
  
  <pre class="lang-py prettyprint-override"><code>amount_stars = soup.find('div', 'item-rating').find('div', 'stars').find_all('i', 'active-star') #div data-rating-value
  amount_stars = len(amount_stars)
  </code></pre>
  
  <p>This brings the number of active stars not their actual rating</p>
  
  <p><br />
  PS: I think the closest thing to xpath in <strong>BeautifulSoup</strong> is the select but the safest thing is that I'm wrong</p>