Visualizações em PDF
Visualizações em PDF
Visualizações em PDF

Get text using WebScraping in Laravel 2022 with DomCrawler

142 Views Asked by At
<span class="paperbuzz-source-name" id="paperbuzz-source-pdf">
    Visualizações em PDF
     <div class="paperbuzz-count-label" id="paperbuzz-count-pdf">
       <i class="icon-pdf" aria-hidden="true"></i> 8 <--- *** I NEED THIS INFOROMATION ***
    </div>
</span>

I am trying to get an information using Symfony's DomCrawler:

$downloads = $crawler->filter('div#paperbuzz-count-pdf')->text();

also I tried:

$downloads = $crawler->filter('#paperbuzz-count-pdf')->text();

And returns:

InvalidArgumentException: "The current node list is empty"

Is there a way to get that information?

But it returns empty

0

There are 0 best solutions below