Created
January 17, 2020 13:07
-
-
Save mvnp/2c2a2048a5494bce603d6cf1f190cec1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## https://www.acate.com.br/associados/page/2/ < 100 | |
## | |
$client = new \Goutte\Client(); | |
$result = []; | |
for ($i = 1; $i <= 2; $i++) | |
{ | |
$crawler = $client->request("GET", "https://www.acate.com.br/associados/page/{$i}/"); | |
$nodeValues = $crawler->filter('body div.listing a')->each(function (Crawler $node, $i) { | |
// return $node->text(); | |
$result[] = $node->attr('href'); | |
}); | |
return $result; | |
} | |
echo "<pre>"; | |
print_r(array_unique($nodeValues)); | |
echo "</pre>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment