Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我尝试将 HTTPCACHE 与 scrapyd 一起使用时,出现以下错误:
[scrapy] WARNING: Disabled Httpcache Middlware: unable to find scrapy.cfg file to infer project data dir
问题是 http 缓存默认使用相对路径httpcache。
httpcache
这在您从命令行正常运行蜘蛛时有效,但在将其作为服务运行时无效。
解决方案是将HTTPCACHE_DIR[docs]设置设置为绝对路径。
HTTPCACHE_DIR