单次爬网付费错误响应包含带特定错误代码的 crawler-error 标头。下表提供了所有可能错误代码的完整参考:
| 错误代码 | HTTP 状态码 | 应该做什么 |
|---|---|---|
CrawlerForbidden |
403 | 网站所有者已阻止您的爬虫。您无法访问此内容。 |
StrongAuthRequired |
400 | 在您的请求中包含带有强身份验证的有效 Web Bot Auth 标头。 |
InvalidSignature |
400 | 在您的请求中同时包含 signature-input 和 signature 标头。请参阅 Web Bot Auth 文档。 |
InvalidCrawlerPriceValue |
400 | 检查您的 crawler-exact-price 或 crawler-max-price 标头值格式是否正确(例如,USD 0.01)。 |
MissingCrawlerPrice |
402 | 在请求中包含 crawler-exact-price 或 crawler-max-price 标头。 |
PaymentFailed |
403 | 验证您的付款处理在单次爬网付费设置中是否已正确配置。如果问题仍然存在,请联系 Cloudflare 支持团队。 |
InvalidCrawlerExactPrice |
402 | 更新您的 crawler-exact-price 以匹配来自响应标头的 crawler-price 值。 |
InvalidCrawlerMaxPrice |
402 | 提高您的 crawler-max-price 以满足或超过来自响应标头的 crawler-price 值。 |
ConflictingPriceHeaders |
400 | 每次请求仅使用一个价格标头。移除 crawler-max-price 或 crawler-exact-price 之一。 |
InvalidContentPrice |
502 | 源站返回了无效的价格。这是网站所有者的配置问题。请稍后重试或联系网站所有者。 |
InternalError |
500 | 发生了服务器错误。使用指数退避算法重试您的请求。 |