spekulatius / PHPScraper

A universal web-util for PHP.
https://phpscraper.de
GNU General Public License v3.0
515 stars 73 forks source link

Expose GoutteClient as an accessible property (#154) #155

Closed amurrell closed 1 year ago

amurrell commented 1 year ago

Updates:

Provide access to the GoutteClient - for any custom needs not wrapped in existing functions. Particularly useful for getting the response of the original request (eg. to get status code)

Example usage:

$statusCode = $web->client()->getInternalResponse()->getStatusCode();

This was previously requested functionality in https://github.com/spekulatius/PHPScraper/issues/60 and is requested again in https://github.com/spekulatius/PHPScraper/issues/154

spekulatius commented 1 year ago

Hey @amurrell,

okay, the topic got a bit lost. I've merged it in. Feel free to raise detail cases that will make working with the lib/Goutte easier.

Cheers, Peter