title: Simple HTML DOM:Cannot fetch ant pagination
body: <p>I am trying to scrape a website to estimate number of products against provided keyword. to accomplish this task instead of scrolling through each page and count the products manually, all that I want to do is to find the last page displayed in <code>ant-pagination</code> as <code>ant-pagination-item</code> and multiply it with total number of products on one page to get an estimated number of products.
  I have written it using <code>simple_html_dom.php</code> this is what my code looks like.</p>
  <pre><code>&lt;?php
      require_once('simple_html_dom.php');
      $query = $_POST['q'];
      $url = &quot;https://www.daraz.pk/catalog/?q=&quot;.$query;
      $html = file_get_html($url);
  
      if (!empty($html)) {
          $pages = $html-&gt;find(&quot;li.ant-pagination-item&quot;,-1);  
          $pages = html_entity_decode($pages-&gt;plaintext);
      }
  
      else {
          echo &quot;Something went wrong&quot;;
      }
  
      echo &quot;&lt;div&gt;&quot;;
      if (isset($pages)){
          echo &quot;FOUND $pages&quot;;
      }
      echo &quot;&lt;/div&gt;&quot;;
  </code></pre>
  <p>I am passing a query through form and appending it to <code>$url</code> the problem is when the code runs it only shows <code>FOUND</code> which means <code>$pages</code> is set. I tried to check if this only happens with pagination or anything else too and found out that only pagination is showing such behavior and I can't figure out a single way to solve it.
  It would be a great help if someone could help me understanding the mistake I am making. you could try visiting <a href="https://www.daraz.pk/catalog/?q=test" rel="nofollow noreferrer">This Link</a> and there will be 102 pages but this script wont return <code>FOUND 102</code> but only <code>FOUND</code> is printed.</p>