Scrapy shell在终端中不断返回无效语法

时间:2018-02-13 00:15:05

标签: python shell terminal scrapy

我正在尝试在终端中启动scrapy shell。但是它一直给出无效的语法错误。我使用的是Python 2.7.13和Mac Sierra 10.12.6。

>>> import scrapy
>>> scrapy shell 'http://quotes.toscrape.com/page/1/'
File "<stdin>", line 1
scrapy shell 'http://quotes.toscrape.com/page/1/'
           ^
SyntaxError: invalid syntax

非常感谢!

1 个答案:

答案 0 :(得分:3)

您不在Python解释器中使用它。它本来是在终端中运行的

您不能在Python解释器中执行此操作,而是打开Terminal并在其中运行它。