title: JSoup displays java.lang.NullPointerException when trying to extract text
body: <p>For some reason, when I run the code below with eBay sold listings, I got <code>java.lang.NullPointerException</code>:</p>
  
  <pre><code> Elements Listings = (Elements) document.getElementsByClass("s-item__details clearfix"); // Each box contains the deal info
      for (Element e : Listings) { // Within each box we would like to extract the listing' names and sold prices
          String listingName = e.select("h3.s-item__title s-item__title--has-tags").first().text();
          System.out.println(listingName);
  </code></pre>
  
  <p>If I remove the for loop, I will be able to display Listings. What I am trying to do is to extract the listings' names and sold prices. May I know what I am doing wrong please?</p>