Amir Salehi
Amir Salehi

Reputation: 25

goutte returns The current node list is empty

The code below always returns The current node list is empty.

 $c = $client->request('GET', 'https://mihanblockchain.com/exchange-prices');

    $selector = "[data-coin|='usdt'] tr td#ex-1-buy-price";

    $result = $c->filter($selector)->text();

thanks in advance

Upvotes: 1

Views: 408

Answers (1)

Andrea Olivato
Andrea Olivato

Reputation: 2545

Since your last selector is #ex-1-buy-price, which is an unique ID in the page, you don't need everything else

$selector = "#ex-1-buy-price";
$result = $c->filter($selector)->text();

This works and returns 840,000,100 تومان

Upvotes: 1

Related Questions