scrapyd 文档包括以下注释:
scrapyd-deploy won’t deploy anything outside the project module...
这是否意味着我不能从我的蜘蛛中的站点包导入?
我的蜘蛛依赖于外部库,例如 MySQL-python 和 tldextract。我必须将这些库包含在项目模块中并从包含库而不是站点包导入吗?
请您参考如下方法:
我认为Deploying your project文档段落应该澄清一些事情:
Finally, to deploy your project use:
scrapyd-deploy scrapyd -p project1This will eggify your project and upload it to the target, printing the JSON response returned from the Scrapyd server. If you have a
setup.pyfile in your project, that one will be used. Otherwise asetup.pyfile will be created automatically (based on a simple template) that you can edit later.
换句话说,您会/应该有 MySQL-python、tldextract 或 setup.py 中列出的其他依赖项将在部署期间自动安装。
