2

我最近被介绍给Splash。我目前正在尝试在splash API中呈现我工作的公司的网页(我不想命名公司)。当我尝试在 Splash API 中呈现页面时,html 包含一条消息:

"Our website can only be used properly with Javascript. 
 Enable Javascript in your browser."

起初我不明白这个错误来自哪里,直到我在浏览器中禁用了 Javascript 并手动访问了该站点。在没有启用 Javascript 的情况下,我在返回的 Splash html 中找到的相同文本现在在我的浏览器中可见:

"Our website can only be used properly with Javascript. 
 Enable Javascript in your browser."

奇怪的是,当我通过在 API 中运行以下脚本来检查是否在启动时启用了 Javascript 时:

function main(splash)
    assert(splash:go('https://www.whatismybrowser.com/is-javascript-enabled'))
    png=splash:png()
    return png
end

我得到以下图像:

在此处输入图像描述

似乎启用了Javascript就好了...

问题:为什么这个网站响应我的请求,好像我禁用了 Javascript?我该如何解决这个问题?我应该添加手动命令来启用 Splash 吗?(抱歉,我了解到我无法提供有关我正在尝试访问的网站的信息,这很烦人。)

编辑:要查看我要呈现的网站中的 html,我使用以下脚本:

function main(splash, args)
   assert(splash:go(args.url))
   assert(splash:wait(15))
   return {
      html = splash:html(),
      png = splash:png(),
      har = splash:har(),
   }
   end
4

0 回答 0