/**
* Called when the crawler has crawled the given url.
*
* @param \Spatie\Crawler\Url $url
* @param \Psr\Http\Message\ResponseInterface|null $response
*
* @return string
*/
public function hasBeenCrawled(Url $url, $response)
{
$statusCode = parent::hasBeenCrawled($url, $response);
if ($this->isSuccessOrRedirect($statusCode)) {
return;
}
$reason = $response ? $response->getReasonPhrase() : '';
$this->log->warning("{$statusCode} {$reason} - {$url}");
}