1

我的问题与这篇文章密切相关:Splash do not render the entire page

我无法以呈现以下网站的动态部分的方式配置启动画面:

https://www.wunderground.com/history/daily/ro/slava-cerchez%C4%83/LRTC/date/2018-8-03?cm_ven=localwx_history

页面看起来像这样

但它应该看起来像这样

这是启动脚本:

function main(splash, args)
  assert(splash:go(args.url))
  assert(splash:wait(5))
  splash:set_viewport_full()
  splash.private_mode_enabled = false
  splash.indexeddb_enabled = true
  splash.html5_media_enabled = true


  return {
    html = splash:html(),
    png = splash:png(),
    har = splash:har(),


  }
end

我已经尝试增加等待时间并禁用私人模式。如果有人能提示如何正确配置启动画面以便呈现 java 脚本部分,我将非常高兴。

4

1 回答 1

0

我对该站点上的历史天气数据也有同样的问题。我无法弄清楚如何让页面使用 Splash 呈现。但是,使用 Seleuium 驱动的浏览器似乎可以正确呈现页面。这并不理想,因为您实际上必须渲染页面,但它可以工作。

硒:https ://selenium-python.readthedocs.io/installation.html

于 2022-03-01T15:59:36.990 回答