Closed freddurst1805 closed 5 years ago
can you post the error message?
Ok at the moment I can't reproduce the context, because I use another solution. Anyway I'll try to expose you the problem as clear as possible.
I use another library based on Guzzle, but that use the version 6. You actually use the Guzzle 5, so if I install both, I have a namespace conflict.
If I install the Guzzle v6 and not the 5, the SerpScraper is not working anymore, but I can't write you the error code here. I just remember the error occured in a call to Guzzle function.
Hope it will helps and thank you for the quick answer :)
Okay, a lot of things have changed since guzzle5 so I'll probably end up just not using guzzle at all and write my own little cUrl based client. I made some changes, so for now this should work with guzzle6: https://github.com/Athlon1600/SerpScraper/tree/2.0
Super thank you for the reactivity ! I totally agree with your idea, guzzle looks big for this project. I also needed to tweak your class GoogleSearch to integrate multi proxy management with specific port
Call to undefined method GuzzleHttp\Psr7\Response::getEffectiveUrl(). How to fix ? Thanks.
preg_match() expects parameter 2 to be string, object given ( #183 - if(preg_match('/<img src="([^"]+)"/', $captcha_html, $matches)){ } ) . How to fix it ? Thanks.
do a var_dump($captcha_html); and post the output here
object(GuzzleHttp\Psr7\Response)#392 (6) { ["reasonPhrase":"GuzzleHttp\Psr7\Response":private]=> string(19) "Service Unavailable" ["statusCode":"GuzzleHttp\Psr7\Response":private]=> int(503) ["headers":"GuzzleHttp\Psr7\Response":private]=> array(9) { ["Date"]=> array(1) { [0]=> string(29) "Thu, 01 Dec 2016 03:25:25 GMT" } ["Pragma"]=> array(1) { [0]=> string(8) "no-cache" } ["Expires"]=> array(1) { [0]=> string(29) "Fri, 01 Jan 1990 00:00:00 GMT" } ["Cache-Control"]=> array(1) { [0]=> string(35) "no-store, no-cache, must-revalidate" } ["Content-Type"]=> array(1) { [0]=> string(9) "text/html" } ["Server"]=> array(1) { [0]=> string(21) "HTTP server (unknown)" } ["Content-Length"]=> array(1) { [0]=> string(4) "3308" } ["X-XSS-Protection"]=> array(1) { [0]=> string(13) "1; mode=block" } ["X-Frame-Options"]=> array(1) { [0]=> string(10) "SAMEORIGIN" } } ["headerNames":"GuzzleHttp\Psr7\Response":private]=> array(9) { ["date"]=> string(4) "Date" ["pragma"]=> string(6) "Pragma" ["expires"]=> string(7) "Expires" ["cache-control"]=> string(13) "Cache-Control" ["content-type"]=> string(12) "Content-Type" ["server"]=> string(6) "Server" ["content-length"]=> string(14) "Content-Length" ["x-xss-protection"]=> string(16) "X-XSS-Protection" ["x-frame-options"]=> string(15) "X-Frame-Options" } ["protocol":"GuzzleHttp\Psr7\Response":private]=> string(3) "1.1" ["stream":"GuzzleHttp\Psr7\Response":private]=> object(GuzzleHttp\Psr7\Stream)#394 (7) { ["stream":"GuzzleHttp\Psr7\Stream":private]=> resource(300) of type (stream) ["size":"GuzzleHttp\Psr7\Stream":private]=> NULL ["seekable":"GuzzleHttp\Psr7\Stream":private]=> bool(true) ["readable":"GuzzleHttp\Psr7\Stream":private]=> bool(true) ["writable":"GuzzleHttp\Psr7\Stream":private]=> bool(true) ["uri":"GuzzleHttp\Psr7\Stream":private]=> string(10) "php://temp" ["customMetadata":"GuzzleHttp\Psr7\Stream":private]=> array(0) { } } }
I tried, but Captcha does not run, return an array empty. ( i have account deathbycaptcha). Thanks.
this new guzzle version really screwed everything up.... but this should work now:
https://github.com/Athlon1600/SerpScraper/commit/c2d8d51b754676f4fe1769ba6f6c3d8ba0551f13
We have a conflict using the guzzlehttp 6 with other bundles. Can you update your script to work with the new version of guzzle ?
Thank you in advance :)