WebScreenshot: ASP.NET Core + Selenium 实现 网页截图

WebScreenshot

ASP.NET Core + Selenium 实现 网页截图

仓库

  • GitHub: https://github.com/yiyungent/WebScreenshot

Introduce

ASP.NET Core + Selenium 实现 网页截图

Quick Start

方式1: 使用 Railway 免费部署

方式2: 使用 Heroku 免费部署

方式3: 使用 Docker

# 获取源代码: 方式1: ssh 
git clone git@github.com:yiyungent/WebScreenshot.git
# 获取源代码: 方式2: https 
git clone https://github.com/yiyungent/WebScreenshot.git

docker build -t yiyungent/webscreenshot -f src/WebScreenshot/Dockerfile .

docker run -d -p 5004:80 -e ASPNETCORE_URLS="http://*:80" --name webscreenshot yiyungent/webscreenshot

Demo

API 文档

环境变量

环境变量名称必填备注
WEBSCREENSHOT_CACHEMINUTES截图 缓存时间 (分钟), 默认 60
WEBSCREENSHOT_CACHEMODE缓存模式, 默认 memory, 可填 file

注意:

强烈建议 使用 Railway 部署的用户,设置 WEBSCREENSHOT_CACHEMODEfile , 降低内存占用,

大多数 出错啦! ,都是由于内存不足

注意:
Railway Deploy , 处于 ACTIVE 后,此时 Server Error,只需要等待一会完全启动完成即可。

注意:

正常运行较长时间后, 当 Railway 长时间 显示 Server Error 时,但 Railway 后台处于 active 时,说明 服务已经挂掉,

你可以通过 修改 环境变量 (无需真修改,只要点击 √ 保存一次就行) 的方式,重新触发 Deploy

相关项目

Donate

WebScreenshot is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

We accept donations through these channels:

Author

WebScreenshot © yiyun, Released under the MIT License.
Authored and maintained by yiyun with help from contributors (list).

GitHub @yiyungent Gitee @yiyungent

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值