【问题标题】:Scrapy shell keeps returning invalid syntax in terminalScrapy shell 在终端中不断返回无效语法
【发布时间】:2018-02-13 00:15:05
【问题描述】:

我正在尝试在终端中启动 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

非常感谢!

【问题讨论】:

  • 这是一个 shell 命令,而不是 Python 命令。先退出 Python。

标签: python shell terminal scrapy


【解决方案1】:

您不要在 Python 解释器中使用它。它应该在终端中运行

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-23
    • 2017-10-13
    • 1970-01-01
    • 2021-11-24
    • 2021-01-22
    • 2020-04-28
    • 2018-12-17
    • 2012-04-02
    相关资源
    最近更新 更多