Git Product home page Git Product logo

scrapeninja-api-php-client's People

Contributors

restyler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scrapeninja-api-php-client's Issues

Invalid header ERROR

ERROR:


PHP Fatal error:  Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://scrapeninja.p.rapidapi.com/scrape` resulted in a `422 Unprocessable Entity` response:
{"status":"fail","message":"Invalid header: Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...,"errors":[{"headers":"In (truncated...)
 in /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create()
#1 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#2 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#3 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promi in /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://scrapeninja.p.rapidapi.com/scrape` resulted in a `422 Unprocessable Entity` response:
{"status":"fail","message":"Invalid header: authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","errors":[{"headers":"In (truncated...)
 in /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create()
#1 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#2 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#3 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/promi in /home/bguder/vfsGlobalHack/httphack/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

$response = $client->scrape([
    "url" => "https://lift-api.vfsglobal.com/appointment/slots?countryCode=tur&missionCode=pol&centerCode=ANK-&loginUser=xxxxxxx&visaCategoryCode=SVTOUR&languageCode=en-US&applicantsCount=1&days=180&fromDate=02%2F05%2F2022&slotType=2&toDate=29%2F10%2F2022", // target website URL
    "geo" => "us", // Proxy geo. eu, br, de, fr, 4g-eu, us proxy locations are available. Default: "us"
    "headers" => ["Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiSW5kaXZpZHVhbCIsInVzZXJJZCI6IktBc0U5SUZnWHdVQTE2U0MwczVhbUE9PSIsImVtYWlsIjoiWmVOaVA1MVIwRm1Yb2F3T2JlUjVKOXR0STFzTi92ODcrdWc5VVZrY1pnaXI2aStVZWE2Z09JdUFjVldLa09NVCIsIm5iZiI6MTY1MTQ0Mjg2MSwiZXhwIjoxNjUxNDQ4ODYxLCJpYXQiOjE2NTE0NDI4NjF9.D5NQvHrEt5Ki4Gr643_ocR_PQuG-7GX_V_2G-tdgv7g"], // Custom headers to pass to target website. User-agent header is not required, it is attached automatically.
    "method" => "GET" // HTTP method to use. Default: "GET". Allowed: "GET", "POST", "PUT".
]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.