# Automatically created by: scrapy startproject
#
# For more information about the [deploy] section see:
# https://scrapyd.readthedocs.io/en/latest/deploy.html
[settings]
default = projectname.settings
[deploy]
#url = http://localhost:6800/
project = projectname
因此,为了指定要使用的shell,您需要将其添加到settings头文件下,如下所示。
# Automatically created by: scrapy startproject
#
# For more information about the [deploy] section see:
# https://scrapyd.readthedocs.io/en/latest/deploy.html
[settings]
default = projectname.settings
shell = python
[deploy]
#url = http://localhost:6800/
project = projectname
1条答案
按热度按时间kcrjzv8t1#
根据史瑞比的文件:
通过Scrapy的设置,你可以配置它使用ipython、bpython或标准python shell中的任何一个,不管安装了哪一个。这是通过设置SCRAPY_PYTHON_SHELL环境变量来完成的;或者在scrapy.cfg中定义它:
默认的
scrapy.cfg
如下所示:因此,为了指定要使用的shell,您需要将其添加到
settings
头文件下,如下所示。我已经测试并确认了这一点,即使我在相同的环境中安装了ipython,它也能正常工作,并且确实使用了标准的python shell。