Goutte scraping google ppa php

175 views Asked by At

I want to create scrap PPA google using Goutte this code is working fine, but why I cannot get only PPA results?

$data = $client->request('GET', 'http://www.google.co.in/search?ix=nh&sourceid=chrome&ie=UTF-8&q=php+developer');
$data->filter('html >body >div > div > div > div > div > div>div>div:nth-child(1)')->each(function ($node) {
    print_r($node->text()."<br><br>");
});

enter image description here

The red box is only what I want to get. Are my selector is wrong?

enter image description here

and now i change the selector to html>body>div>div>div> div> div and the results is

enter image description here

0

There are 0 answers