resource_timeout属性用于设置加载的超时时间,单位是秒,如果设置为 0 代表不检测超时,如下,设置超时时间为 0.1 秒:

function main(splash)
splash.resource_timeout = 0.1
assert(splash:go('https://www.taobao.com/'))
return splash:png()
end

执行之后抛出异常:

{
"description": "Error happened while executing Lua script",
"info": {
"type": "LUA_ERROR",
"source": "[string \"function main(splash)\r...\"]",
"message": "Lua error: [string \"function main(splash)\r...\"]:3: network5",
"error": "network5",
"line_number": 3
},
"type": "ScriptError",
"error": 400
}

最新文章

  1. Django模板与Vue.js冲突问题
  2. [LintCode] Maximum Subarray 最大子数组
  3. Atitit 基于dom的游戏引擎
  4. 【CodeForces 589F】Gourmet and Banquet(二分+贪心或网络流)
  5. 9----Lua中的面向对象
  6. Java for LeetCode 153 Find Minimum in Rotated Sorted Array
  7. Python学习之路——类
  8. gulp快速入门
  9. ORACLE查看和更改的最大连接数
  10. ASP.NET Web Service中使用Session 及 Session丢失解决方法 续
  11. IWorkSpace接口介绍
  12. 百度推送-sitemap-使用playframework框架实现-java
  13. node.js 模板 ejs 转
  14. 微信网页分享 jssdk config:invalid signature 签名错误
  15. 在Linux上安装ant环境
  16. react组建生命周期
  17. python 二分查找法
  18. nginx+tomcat9+redisson+redis+jdk1.8简单实现session共享
  19. 2017-2018-2 20165237 实验三《 敏捷开发与XP实践》实验报告
  20. hdu1698 Just a Hook 【区间修改】(模板题)

热门文章

  1. Claims-Based Authentication and Authorization
  2. 6 ways to import data into SQL Server
  3. python 读写二进制文件实例
  4. 高通 添加 cmdline
  5. VIM下的插入模式的相关知识:
  6. 解密QQ——队列
  7. BIO、NIO、AIO系列二:Netty
  8. word文档加密破解方法,实测有效
  9. windows上開啟多個apache服務器
  10. php + crontab 执行定时任务