当前位置: 移动技术网 > IT编程>脚本编程>Python > pyspider+PhantomJS的代理设置

pyspider+PhantomJS的代理设置

2019年03月08日  | 移动技术网IT编程  | 我要评论

如何打开系统服务,音速昏昏官网,耶利娅

环境:pyspider0.3.9 phantomjs2.1.1,均为最新版

进程用supervisor托管的。

其中需要加的几个地方:

webui进程:

pyspider -c config.json --phantomjs-proxy=127.0.0.1:25555 webui

processor进程:

pyspider -c config.json --phantomjs-proxy=127.0.0.1:25555 processor

fetcher进程:

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的本地地址支持。

phantomjs 进程后面设置phantomjs 的代理端口,文中的加了验证,免密的可以直接写 -- --proxy=ip:port 不写--proxy-auth=name:password

------------------------------

遇到这个提示,应该可以忽略不计,意思是提示你,任务里面的代理设置并不会影响phantomjs

phantomjs does not support specify proxy from script, use phantomjs args instead

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网