日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

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

發布時間:2024/1/23 python 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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运行的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。