在 RequestManagerTandem 后面, ThrottlingRequestManager 没有任何效果
作者: vdusek创建于 2026年9月16日更新于 2026年9月16日
标签bugt-tooling
`BasicCrawler` 在三个地方使用 bare `isinstance(self._request_manager, ThrottlingRequestManager)` 检查来找到节流器: `respect_robots_txt_file` 启动警告(`_basic_crawler.py:708`), 429 记录(`:1644`) 和 robots.txt 爬取延迟(`:1710`). `RequestLoader.to_tandem()` 将管理器包装为 `RequestManagerTandem`, 因此 `await loader.to_tandem(throttler)` 会默默地丢弃每个域的延迟和爬取延迟。两个警告都表示爬虫没有使用 `ThrottlingRequestManager`, 而其中一个是配置的。`RequestManagerTandem` 不暴露包装的管理器的访问器, 因此需要新的公共 API 来修复此问题。 #2158 刻意将此问题排除在范围之外。
内容来源: apify/crawlee-python