环境:pyspider0.3.9 PhantomJS2.1.1,均为最新版web
进程用supervisor托管的。json
其中须要加的几个地方:ide
webui进程:fetch
pyspider -c config.json --phantomjs-proxy=127.0.0.1:25555 webui
processor进程:ui
pyspider -c config.json --phantomjs-proxy=127.0.0.1:25555 processor
fetcher进程:spa
pyspider -c config.json --phantomjs-proxy=127.0.0.1:25555 fetcher
phantomjs进程:代理
pyspider -c config.json phantomjs -- --proxy=ip:port --proxy-auth=name:password
以上须要注意的是,webui、processor 、fetcher 都加了phantomjs的本地地址支持。code
phantomjs 进程后面设置phantomjs 的代理端口,文中的加了验证,免密的能够直接写 -- --proxy=ip:port 不写--proxy-auth=name:passwordpyspider
------------------------------blog
遇到这个提示,应该能够忽略不计,意思是提示你,任务里面的代理设置并不会影响phantomjs
phantomjs does not support specify proxy from script, use phantomjs args instead