title: Retrieving a span value in html using jsoup
body: <p>I am trying to retrieve the number "1" from the "display-ratings" span class in the snippet of html below:</p>
  
  <pre><code> &lt;article class="surveys-verbatim__item "&gt;
      &lt;h3 id="engine_major"&gt;
          &lt;a class="surveys-verbatim__item-title surveys-verbatim__item-title--font-large crux-body-copy crux-body-copy--bold" data-cr-collapse data-target=".surveys-verbatim__item" href="javascript:void(0);"&gt;
              Engine Major
              &lt;span class="crux-icons crux-icons-caret-up-small surveys-verbatim__item__arrow"&gt;&lt;/span&gt;
          &lt;/a&gt;
      &lt;/h3&gt;
      &lt;div class="surveys-verbatim__item-body"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-sm-6 col-xs-12"&gt;
                  &lt;p class="crux-body-copy crux-body-copy--small surveys-verbatim__item-description"&gt;Engine rebuild or replacement, cylinder head, head gasket, turbo or supercharger, timing chain or timing belt.&lt;/p&gt;
              &lt;/div&gt;
                                  &lt;div class="col-md-offset-2 col-md-4 col-sm-offset-1 col-sm-5 col-xs-12"&gt;
                      &lt;div class="surveys-verbatim__item-ratings"&gt;
                          &lt;div class="brick-chart-chart-container"&gt;
      &lt;div class="brick-chart-chart-wrapper-container clearfix"&gt;
  &lt;div class="brick-chart-chart-wrapper poor"&gt;
      &lt;div class="brick-chart-brick"&gt;&lt;/div&gt;
      &lt;div class="brick-chart-brick active" style="width: 20%"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="score-range "&gt;
                  &lt;span&gt;&lt;span class="display-ratings"&gt;1&lt;/span&gt; / 5&lt;/span&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                          &lt;/div&gt;
                  &lt;/div&gt;
  &lt;/article&gt;
  </code></pre>
  
  <p>I am using Jsoup in Java and have the following code:</p>
  
  <pre><code>import org.jsoup.Jsoup;
  import org.jsoup.nodes.Document;
  import org.jsoup.nodes.Element;
  import org.jsoup.select.Elements;
  public class Main {
  
  public static void main(String[] args) throws Exception {
  
      final Document document = Jsoup.connect("https://www.consumerreports.org/cars/audi/a6/2006/reliability?pagestop").get();
      for (Element element : document.select("article.surveys-verbatim__item")) {
          String rating = element.select("span.display-ratings").text();
          System.out.println(rating);
      }
  
    }
  }
  </code></pre>
  
  <p>This output blank strings. Can anyone let me know if they know how to extract the value listed in the span class "display-ratings" ?</p>
  
  <p>Thank you!</p>