scrapy-splash icon indicating copy to clipboard operation
scrapy-splash copied to clipboard

Splash 如何执行 JSON.stringify(window.performance.timing)

Open songhao8080 opened this issue 4 years ago • 0 comments

function main(splash, args)

  assert(splash:go(args.url))
  assert(splash:wait(0.5))
    local performance = splash:jsfunc([[
  function () {
    var divs = JSON.stringify(window.performance.timing);
    return performance;
  }
  ]])
  return {
 		title = performance(),
    har = splash:har(),
  }
end

如果这样执行返回为空

songhao8080 avatar Sep 23 '21 02:09 songhao8080