New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用--phantomjs-proxy="10.11.12.11:8080"启动指令以后的错误 #448

Closed
dhcn opened this Issue May 20, 2016 · 10 comments

Comments

Projects
None yet
3 participants
@dhcn

dhcn commented May 20, 2016

完整的指令:
pyspider -c /var/www/pyspider/config.json --phantomjs-proxy="10.11.12.11:8080" all
爬虫调试的时候报错:
[E 160520 17:55:49 base_handler:194] No JSON object could be decoded
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pyspider/libs/base_handler.py", line 187, in run_task
result = self._run_task(task, response)
File "/usr/local/lib/python2.7/dist-packages/pyspider/libs/base_handler.py", line 166, in _run_task
response.raise_for_status()
File "/usr/local/lib/python2.7/dist-packages/pyspider/libs/response.py", line 183, in raise_for_status
raise http_error
HTTPError: No JSON object could be decoded

无--phantomjs-proxy选项的时候没问题。
代理是测试过的代理也没问题。
问题比较紧急,就不英语了。
pyspider版本:3.6
把配置写到config.json里面,也是报这个错误

@binux

This comment has been minimized.

Owner

binux commented May 21, 2016

Is phantomjs running on "10.11.12.11:8080" ?

@dhcn

This comment has been minimized.

dhcn commented May 22, 2016

oh, i hava something wrong In understanding.
I want to set proxy for phantomjs.this setting param is not for this.
but how to set proxy for phantomjs?

@binux

This comment has been minimized.

Owner

binux commented May 22, 2016

pyspider phantomjs -- --proxy=address:port

@dhcn

This comment has been minimized.

dhcn commented May 23, 2016

Error: Got unexpected extra argument (--proxy=...:8080)
Error: no such option: --proxy

@dhcn

This comment has been minimized.

dhcn commented May 23, 2016

phantomjs --version
1.9.0

@dhcn

This comment has been minimized.

dhcn commented May 23, 2016

中间四个杠,两个杠都报错,有没有解决的招?

@binux

This comment has been minimized.

Owner

binux commented May 24, 2016

which pyspider version you are using?

@dhcn

This comment has been minimized.

dhcn commented May 24, 2016

pyspider --version
pyspider, version 0.3.6

@binux

This comment has been minimized.

Owner

binux commented Jun 7, 2016

you need pyspider>=0.3.7

@binux binux closed this Jun 7, 2016

@sevck

This comment has been minimized.

sevck commented Apr 11, 2017

我这里测试发现和楼主出现相同的问题,现在还有解决办法吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment