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 FILENAME???????????a json file with default values for
subcommands. {"webui": {"port":5001}}
--logging-config TEXT???????????logging 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]
--debug?????????????????????????debug mode
--queue-maxsize INTEGER?????????maxsize of queue
--taskdb TEXT???????????????????database url for taskdb, default: sqlite
--projectdb TEXT????????????????database url for projectdb, default: sqlite
--resultdb TEXT?????????????????database url for resultdb, default: sqlite
--message-queue TEXT????????????connection 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 TEXT??????????phantomjs proxy ip:port
--data-path TEXT????????????????data dir path
--add-sys-path / --not-add-sys-path
add current working directory to python lib
search path
--version???????????????????????Show the version and exit.
--help??????????????????????????Show this message and exit.
Commands:
all????????????Run all the components in subprocess or...
bench??????????Run Benchmark test.
fetcher????????Run Fetcher.
one????????????One mode not only means all-in-one, it runs...
phantomjs??????Run phantomjs fetcher if phantomjs is...
processor??????Run Processor.
result_worker??Run result worker.
scheduler??????Run Scheduler, only one scheduler is allowed.
send_message???Send Message to project from command line
webui??????????Run 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
才能開始爬取
沒法直接在命令行或者別的什么方式去觸發爬取。
注:官網文檔中介紹的部署,只是參數設置方面的部署,而非直接觸發運行的方式。
那接下來,只能去試試:
總結
以上是生活随笔為你收集整理的python is not allowed to run_【无法解决】PySpider的部署运行而非调试界面上RUN运行的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: win10 远程桌面卡顿_Win10系统
- 下一篇: formdata怎么传数组_如何使用fo