Scrapy 提供了内置的 Telnet 终端,以供检查,控制 Scrapy 运行的进程。Telnet 仅仅是一个运行在 Scrapy 进程中的普通 Python 终端。因此你可以在其中做任何是。
这个 Telnet 在 scrapy 中什么作用,我的脚本挂在服务器报错如下
[scrapy.utils.signal][ERROR] Error caught on signal handler: > Traceback (most recent call last): File "/home/www/.local/lib/python3.4/site-packages/twisted/internet/
defer.py", line 151, in maybeDeferred result = f(args, **kw) File "/usr/lib/python3.4/site-packages/pydispatch/
robustapply.py", line 55, in robustApply return receiver(arguments, **named) File "/home/www/.local/lib/python3.4/site-packages/scrapy/extensions/
telnet.py", line 63, in stop_listening self.port.stopListening() AttributeError: 'TelnetConsole' object has no attribute 'port'