title: Jsoup getElementsByClass returns null value
body: <p>I'm trying to write a program that fetches prices information from a certain site. I want to get the first element, but the getElementsByClass returns a null value.</p>
  <pre><code> String site = new String(&quot;https://www.ebay.it/sch/i.html?_from=R40&amp;_nkw=&quot; + searches[n] +&quot;vhs&amp;_sacat=0&amp;_sop=15&quot;);
                  Document document = Jsoup.connect(site).header(&quot;Accept-Encoding&quot;, &quot;gzip, deflate&quot;).userAgent(&quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0&quot;).timeout(600000).get();
                  elements = document.getElementsByClass(&quot;s-item__price&quot;).first();
                  prices[n] = elements.text();
  </code></pre>
  <p>This code is in a thread that gets launched when I press a button. This is the button listener</p>
  <pre><code>       findPrices.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              searches= new String[1000];
              for (int t = 0; t &lt; numeroEdit+1; t++) {
                  searches[t] = new String();
                  searches[t] = String.valueOf(editTexts[t].getText());
                  searches[t].replace(' ', '+');
              }
                  Thread t1 = new Thread();
                  t1.start();
                  ll.removeAllViews();
                  ll.addView(addLine);
                  ll.addView(findPrices);
                  for(int l =0; l &lt; numeroEdit; l++){
                      editTexts[l].setText(prices[l] + &quot;l&quot;);
                      ll.addView(editTexts[l]);
                      editTexts[l].setText(prices[l]);
                  }
              }
  
      });
  </code></pre>
  <p>Thanks for the help</p>