我用的spider+selenium+headless chrome
方案是在fetcher里边加了个selenium_fetcher.py
运行时先开一个chrome web server 端口9000
然后运行pyspider --phantomjs-proxy=http://0.0.0.0:9000
正常采集没问题,但是一使用 fetch_type='js' 调用selenium就报错
pyspider错误提示:ValueError('No JSON object could be decoded',)
chrome web server错误提示:post 500 get 404
selenium/webdriver/remote/errorhandler.py", line 208, in check_response
raise exception_class(value)
最终显示采到的页面是404页面