Splash: 无法查看网页内容

我正在尝试使用 Splash 渲染 HTML 并查看网站内容。脚本一直正常工作,但是对于 https://www.galaxus.ch/search?q=5010533606001 这个网站,我突然无法使用同样的脚本查看网站内容。该脚本对于其他网站是正常工作的,但对于这个网站 https://www.galaxus.ch/search?q=5010533606001,我无法查看任何内容。

请注意,我之前已经使用过 Splash 查看过同一个网站,并且工作正常。

function main(splash, args)
  splash:set_user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36")
  splash.private_mode_enabled = false
  assert(splash:go(args.url))
  assert(splash:wait(5))

  splash:set_viewport_full()
  return {
    splash:png(),
    splash:html()
    }
end

enter image description here

原文链接 https://stackoverflow.com/questions/69123031

点赞