在scrapy终端中手动启动爬虫全部正常,通过scrapyd部署启动包含selenium插件的爬虫,运行爬虫文件,但不运行selenium插件,没有出现爬虫结果,但是查看scrapyd的job正常启动,运行时间只有1s。 通过scrapy的settings设置selenium插件, - SELENIUM_DRIVER_NAME = 'chrome'
- SELENIUM_DRIVER_EXECUTABLE_PATH = which(r'./chromedriver')
- SELENIUM_DRIVER_ARGUMENTS = []
复制代码在spider中通过yield SeleniumRequest使用selenium。 scrapyd报错: - venv/lib/python3.8/site-packages/scrapy/utils/project.py:81: ScrapyDeprecationWarning: Use of environment variables prefixed with SCRAPY_ to override settings is deprecated. The following environment variables are currently defined: JOB, LOG_FILE, SLOT, SPIDER
- warnings.warn(
复制代码(该警告已经解决) 但是目前使用scrapyd调度spider仍然无法启动selenium插件,是否因为scrapy-selenium插件不支持scrapyd? 求解决!如何才能让scrapyd正常使用selenium插件?
|