100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > python is not allowed to run_【无法解决】PySpider的部署运行而非调试界面上RUN运行

python is not allowed to run_【无法解决】PySpider的部署运行而非调试界面上RUN运行

时间:2021-10-27 16:53:14

相关推荐

python is not allowed to run_【无法解决】PySpider的部署运行而非调试界面上RUN运行

折腾:

后,虽然可以打开:

在界面上把status改为DEBUG或RUN去运行,但是有些爬虫要爬完所有内容需要很长时间,比如此处:但是界面上调试运行,跑了好多个小时,还没结束,所以先去暂停了:

另外,还有个因素是:

此处在运行此Pyspider的项目同时,要去调试另外一个PySpider项目

-》所以除了打算更换默认的5000端口之外,最好让之前的PySpider项目在命令行的后台运行,不要影响此处将要调试的新项目。

去找找:如何直接运行,而不是界面上调试选择DEBUG或RUN的运行。

感觉就是属于:Pyspider的部署方面的问题了

没看懂如何命令行直接运行

pyspider 命令行 运行 部署

pyspider command line run not ui➜xxx git:(master) ✗ pyspider --help

Usage: pyspider [OPTIONS] COMMAND [ARGS]...

A powerful spider system in python.

Options:

-c, --config FILENAMEa json file with default values for

subcommands. {"webui": {"port":5001}}

--logging-config TEXTlogging config file for built-in python

logging module[default: /Users/crifan/.loc

al/share/virtualenvs/crawler_qupeiyin_child-

SW6GVzwk/lib/python3.6/site-

packages/pyspider/logging.conf]

--debugdebug mode

--queue-maxsize INTEGERmaxsize of queue

--taskdb TEXTdatabase url for taskdb, default: sqlite

--projectdb TEXTdatabase url for projectdb, default: sqlite

--resultdb TEXTdatabase url for resultdb, default: sqlite

--message-queue TEXTconnection url to message queue, default:

builtin multiprocessing.Queue

--amqp-url TEXT[deprecated] amqp url for rabbitmq. please

use --message-queue instead.

--beanstalk TEXT[deprecated] beanstalk config for beanstalk

queue. please use --message-queue instead.

--phantomjs-proxy TEXTphantomjs proxy ip:port

--data-path TEXTdata dir path

--add-sys-path / --not-add-sys-path

add current working directory to python lib

search path

--versionShow the version and exit.

--helpShow this message and exit.

Commands:

allRun all the components in subprocess or...

benchRun Benchmark test.

fetcherRun Fetcher.

oneOne mode not only means all-in-one, it runs...

phantomjsRun phantomjs fetcher if phantomjs is...

processorRun Processor.

result_workerRun result worker.

schedulerRun Scheduler, only one scheduler is allowed.

send_messageSend Message to project from command line

webuiRun WebUI

pyspider run in command line

算了,直接试试➜xxx git:(master) ✗ pyspider all

phantomjs fetcher running on port 25555

[I 180713 09:15:21 result_worker:49] result_worker starting...

[I 180713 09:15:22 tornado_fetcher:638] fetcher starting...

[I 180713 09:15:22 processor:211] processor starting...

[I 180713 09:15:22 scheduler:647] scheduler starting...

[I 180713 09:15:22 scheduler:126] project xxx updated, status:STOP, paused:False, 0 tasks

[I 180713 09:15:22 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333

[I 180713 09:15:22 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0

[I 180713 09:15:22 app:76] webui running on 0.0.0.0:5000

没用,和之前一样,没有自动启动运行

pyspider 启动

感觉问题就转换为了:

如何开始运行PySpider项目

也还是在界面上切换status才能开始启动爬取

pyspider 如何开始爬取

pyspider how start run

“Start Running

1. Save your script.

2. Back to dashboard find your project.

3. Changing the status to DEBUG or RUNNING.

4. Click the run button.”

貌似只能在webui中更改status为DEBUG或RUNNING,再点击RUN才能开始爬取??

【总结】

貌似PySpider的触发开始真正去爬取的方式,只能通过WebUI界面中

更改status为DEBUG或RUNNING,再点击RUN

才能开始爬取

没法直接在命令行或者别的什么方式去触发爬取。

注:官网文档中介绍的部署,只是参数设置方面的部署,而非直接触发运行的方式。

那接下来,只能去试试:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。