title: Jsoup Google Search Results
body: <p>I am attempting to parse the HTML of google's search results to grab the title of each result. This is done through android in a private nested class shown below:</p>
  
  <pre><code>private class WebScraper extends AsyncTask&lt;String, Void, String&gt; {
  
      public WebScraper() {}
  
      @Override
      protected String doInBackground(String... urls) {
          Document doc;
          try {
              doc = Jsoup.connect(urls[0]).get();
          } catch (IOException e) {
              System.out.println("Failed to open document");
              return "";
          }
          Elements results = doc.getElementsByClass("rc");
          int count = 0;
          for (Element lmnt : results) {
              System.out.println(count++);
              System.out.println(lmnt.text());
          }
          System.out.println("Count is : " + count);
          String key = "test";
          //noinspection Since15
          SearchActivity.this.songs.put(key, SearchActivity.this.songs.getOrDefault(key, 0) + 1);
          // return requested
          return "";
      }
  
  }
  </code></pre>
  
  <p>an example url I am trying to parse: <a href="http://www.google.com/#q=i+might+site:genius.com" rel="nofollow noreferrer">http://www.google.com/#q=i+might+site:genius.com</a></p>
  
  <p>For some reason, when i run the above code, my count is printed as 0, thus no elements are being stored in results. Any help is much appreciated! P.S. docs is definitely initialized and the HTML page is loading properly</p>