Lua脚本:从日历自动选择日期

我正在尝试使用Splash来呈现HTML并查看网站内容。Lua脚本运行良好。

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

问题是,我希望它能够自动从网页日历中设置日期范围。执行后,它将使用下一个01年日期范围重置日期。例如,它将选择日期范围为2011年6月23日至2012年6月23日,执行后将重置日期范围到2012年6月24日至2013年6月24日。它将一直保持到当前日期。我该如何管理这个问题?enter image description here

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

点赞