@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | { |
11 | 11 | $Google = new SearchViaCurl('piedweb.com'); |
12 | 12 | |
13 | - ->setNbrPage(1) // Get Only first Page |
|
14 | - ->setTld('fr') |
|
15 | - ->setLanguage('fr') |
|
16 | - ->setSleep(1) |
|
17 | - ->setCacheFolder(null) |
|
13 | + ->setNbrPage(1) // Get Only first Page |
|
14 | + ->setTld('fr') |
|
15 | + ->setLanguage('fr') |
|
16 | + ->setSleep(1) |
|
17 | + ->setCacheFolder(null) |
|
18 | 18 | ; |
19 | 19 | $results = $Google->extractResults(); |
20 | 20 | |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | { |
26 | 26 | $Google = new SearchViaCurl('piedweb.com'); |
27 | 27 | |
28 | - ->setNbrPage(1) // Get Only first Page |
|
29 | - ->setTld('fr') |
|
30 | - ->setLanguage('fr') |
|
31 | - ->setSleep(1) |
|
32 | - ->setMobile(true) |
|
33 | - ->setCacheFolder(null) |
|
28 | + ->setNbrPage(1) // Get Only first Page |
|
29 | + ->setTld('fr') |
|
30 | + ->setLanguage('fr') |
|
31 | + ->setSleep(1) |
|
32 | + ->setMobile(true) |
|
33 | + ->setCacheFolder(null) |
|
34 | 34 | ; |
35 | 35 | $results = $Google->extractResults(); |
36 | 36 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | ->setSleep(1) |
17 | 17 | ->setCacheFolder(null) |
18 | 18 | ; |
19 | - $results = $Google->extractResults(); |
|
19 | + $results = $Google->extractResults(); |
|
20 | 20 | |
21 | 21 | $this->assertEquals('https://piedweb.com/', $results[0]['link']); |
22 | 22 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | ->setMobile(true) |
33 | 33 | ->setCacheFolder(null) |
34 | 34 | ; |
35 | - $results = $Google->extractResults(); |
|
35 | + $results = $Google->extractResults(); |
|
36 | 36 | |
37 | 37 | $this->assertEquals('https://piedweb.com/', $results[0]['link']); |
38 | 38 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | $Qwant = new QwantSearchViaCurl('piedweb.com'); |
12 | 12 | $Qwant->setNbrPage(1) // Get Only first Page |
13 | - ->setCacheFolder(null) |
|
13 | + ->setCacheFolder(null) |
|
14 | 14 | ; |
15 | 15 | $results = $Qwant->extractResults(); |
16 | 16 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $Qwant->setNbrPage(1) // Get Only first Page |
13 | 13 | ->setCacheFolder(null) |
14 | 14 | ; |
15 | - $results = $Qwant->extractResults(); |
|
15 | + $results = $Qwant->extractResults(); |
|
16 | 16 | |
17 | 17 | $this->assertEquals('https://piedweb.com/', $results[0]['link']); |
18 | 18 | } |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | $Google = new SearchViaCurl('qwanturank'); |
12 | 12 | |
13 | 13 | $Google->setTld('fr') |
14 | - ->setLanguage('fr') |
|
15 | - ->setSleep(6) // to wait between 2 requests on Google |
|
16 | - ->setCacheFolder(null) // to disable storing in the /tmp folder |
|
17 | - //->setCacheExpireTime(86400) // 1 Day |
|
18 | - ->setNbrPage(1) // Nbr de page à extraire |
|
19 | - ->setParameter('num', 100) // to add a parameter in the search url |
|
14 | + ->setLanguage('fr') |
|
15 | + ->setSleep(6) // to wait between 2 requests on Google |
|
16 | + ->setCacheFolder(null) // to disable storing in the /tmp folder |
|
17 | + //->setCacheExpireTime(86400) // 1 Day |
|
18 | + ->setNbrPage(1) // Nbr de page à extraire |
|
19 | + ->setParameter('num', 100) // to add a parameter in the search url |
|
20 | 20 | ; |
21 | 21 | |
22 | 22 | var_dump($Google->extractResults()); |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | $Qwant = new QwantSearchViaCurl('qwanturank'); |
29 | 29 | |
30 | 30 | $Qwant->setLanguage('fr') |
31 | - ->setSleep(6) // to wait between 2 requests on Qwant |
|
32 | - ->setCacheFolder('./tmp') // to disable storing in the /tmp folder |
|
33 | - ->setNbrPage(10) // Nbr de page à extraire |
|
31 | + ->setSleep(6) // to wait between 2 requests on Qwant |
|
32 | + ->setCacheFolder('./tmp') // to disable storing in the /tmp folder |
|
33 | + ->setNbrPage(10) // Nbr de page à extraire |
|
34 | 34 | ; |
35 | 35 | |
36 | 36 | $results = $Qwant->extractResults(); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function isProxyValid(?string $proxy = null) |
23 | 23 | { |
24 | 24 | $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme', 'quad', 'moto', 'velo', |
25 | - 'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ]; |
|
25 | + 'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ]; |
|
26 | 26 | |
27 | 27 | $GoogleSerp = new Search($keywords[array_rand($keywords)]); |
28 | 28 | $GoogleSerp->setTld('fr')->setLanguage('fr')->setSleep(0)->setNbrPage(1)->setCache(false); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function isProxyValid(?string $proxy = null) |
23 | 23 | { |
24 | - $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme', 'quad', 'moto', 'velo', |
|
24 | + $keywords = ['bateau', 'avion', 'navire', 'seconde', 'bac', 'piscine', 'fuser', 'place', 'homme', 'femme', 'quad', 'moto', 'velo', |
|
25 | 25 | 'enfant', 'poilu', 'voiture', 'oiseau', 'singe', 'animaux', 'nature', 'paysage', 'jeux', 'maison', 'paysage', 'jardin', ]; |
26 | 26 | |
27 | 27 | $GoogleSerp = new Search($keywords[array_rand($keywords)]); |