getStatusCode() . "\n"; } public function crawlFailed(UriInterface $url, \Throwable $exception, ?UriInterface $foundOnUrl = null, ?string $linkText = null): void { echo "爬取失败: {$url} 错误: {$exception->getMessage()}\n"; } }