在那儿 . 我需要帮助,让我使用splash部署我的项目,我想更改浏览器语言和插件 . selenium或chrome Console中的以下表达式可以,但在启动时,它不起作用 .
splash:evaljs('Object.defineProperty(navigator,\'plugins\', {
get: function() {
return [\'zh-TW\', \'zh\', \'en-US\', \'en\'];
},
});')
有结果:
{"error": 400, "description": "Error happened while executing Lua script", "info": {"error": "unfinished string near ''Object.defineProperty(navigator,\"plugins\", {'", "source": "[string \"\r...\"]", "line_number": 10, "message": "[string \"\r...\"]:10: unfinished string near ''Object.defineProperty(navigator,\"plugins\", {'", "type": "LUA_INIT_ERROR"}, "type": "ScriptError"}