Closed katesaikishore closed 2 years ago
$client = new Client();
$crawler = $client->request('GET', 'https://factly.in/category/english/'); $data = $crawler->filter('h2 > a')->each(function ($node) { var_dump($node->text()); }); echo $crawler->filter('.image img')->attr('src');
I have used this code but couldn't get the image showing error: The current node list is empty.
$crawler = $client->request('GET', 'https://factly.in/category/english/'); $data = $crawler->filter('h2 > a')->each(function ($node) { var_dump($node->text()); }); echo $crawler->filter('.image img')->attr('src');
I have used this code but couldn't get the image showing error: The current node list is empty.