am scraping data from "Welcome to the Jungle - The guide to employment"
function main(splash, args)
assert(splash:go(args.url))
assert(splash:wait(0.5))
assert(splash:runjs('document.querySelector("#sticky-menu a[data-testid=menu-jobs]").click()'))
splash:set_viewport_full()
return {
html = splash:html(),
png = splash:png(),
har = splash:har(),
}
end
I encountered this error JS error: 'EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline' cdn.welcometothejungle.co
{
"error": 400,
"type": "ScriptError",
"description": "Error happened while executing Lua script",
"info": {
"source": "[string \"function main(splash, args)\r...\"]",
"line_number": 4,
"error": "JS error: 'EvalError: Refused to evaluate a string as JavaScript because \\'unsafe-eval\\' is not an allowed source of script in the following Content Security Policy directive: \"script-src \\'unsafe-inline\\' cdn.welcometothejungle.co platform.linkedin.com www.linkedin.com www.googletagmanager.com tagmanager.google.com www.google-analytics.com connect.facebook.net www.facebook.com www.youtube.com *.ytimg.com loader.wisepops.com app.wisepops.com cdn.wisepops.com optimize.google.com app.getbeamer.com realtime.getbeamer.com player.vimeo.com speakerdeck.com www.slideshare.net talks.golang.org docs.google.com slides.com static.hotjar.com script.hotjar.com *.batch.com polyfill.io *.axept.io\".\\n'",
"type": "LUA_ERROR",
"message": "Lua error: [string \"function main(splash, args)\r...\"]:4: JS error: 'EvalError:
Refused to evaluate a string as JavaScript because \\'unsafe-eval\\' is not an allowed source of
script in the following Content Security Policy directive: \"script-src \\'unsafe-inline\\'
cdn.welcometothejungle.co platform.linkedin.com www.linkedin.com www.googletagmanager.com
tagmanager.google.com www.google-analytics.com connect.facebook.net www.facebook.com
www.youtube.com *.ytimg.com loader.wisepops.com app.wisepops.com cdn.wisepops.com
optimize.google.com app.getbeamer.com realtime.getbeamer.com player.vimeo.com speakerdeck.com
www.slideshare.net talks.golang.org docs.google.com slides.com static.hotjar.com
script.hotjar.com *.batch.com polyfill.io *.axept.io\".\\n'"