I want to get all the item name and price from this website
For example, i want to search for "apple" https://redmart.com/search/apple
I use Goutte for scraping the website. This is the code so far to get all item's name in the list:
$client = new Client();
$crawler = $client->request('GET', 'https://redmart.com/search/apple');
$crawler->filter('h4 > a')->each(function ($node) {
print $node->text()."\n";
});
but when i run the code, it prints nothing. How to get all the item's name and price from the list?