screeenly

stefanzweifelMIT活跃维护

基于 Laravel 的截图即服务应用,通过 URL 或 API 请求自动抓取网页并生成截图,省去自建无头浏览器和截图流程的麻烦。

📸 Screenshot as a Service

v2.0.0发布于 2017-02-11 12:11 UTC534star +1 / 7 天98fork同步于 2026-11-10 23:56 UTC

怎么上手

由 README 提炼,执行前请确认
composer install --no-dev --optimize-autoloader
npm ci && npm run build
npx puppeteer browsers install chrome-headless-shell
硬件要求按 README 说明

README 未说明显存或 GPU 要求;需要能运行 Chrome 无头浏览器(chrome-headless-shell)的环境,数据库可用 MySQL、PostgreSQL 或 SQLite。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 Laravel 的开源截图服务,通过简单 API 把任意网址渲染成网站截图

基于 Laravel 的截图即服务应用,通过 URL 或 API 请求自动抓取网页并生成截图,省去自建无头浏览器和截图流程的麻烦。

核心能力

  • 提供简单 API 接口,传入网址即可生成网站截图
  • 基于 Laravel 13 构建的 PHP Web 应用
  • 用 Puppeteer 驱动 Chrome 无头浏览器渲染页面
  • 支持 MySQL、PostgreSQL 或 SQLite 作为数据库
  • 内置 screeenly:cleanup 定时任务清理旧截图

容易踩的坑

Puppeteer 24 需要单独执行 npx puppeteer browsers install chrome-headless-shell 下载 Chrome,否则无法截图;环境要求 PHP 8.5+、Node.js 22+ 和 Composer 2,版本偏低会装不上;从 Laravel 8 升级需改 .env 变量名(CACHE_DRIVER→CACHE_STORE 等)并跑 migrate;官方不提供 Docker 镜像支持,第三方镜像需自担风险。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.0.0
  1. v2.0.0最新正式版2017-02-11 · 2017-02-11 12:11 UTC
    • Rewrite in newest Laravel Version
    • Split "Laravel Code" from "Screeenly Code"
  2. v1.2.12016-02-22 · 2016-02-22 20:28 UTC
    查看更新说明

    New User-Agent for all screeenly requests: screeenly-bot.

  3. v1.2.02016-02-22 · 2016-02-22 20:27 UTC
    查看更新说明
    • Upgrade to Laravel 5.2
    • Upgrade to PhantomJS 2.0 (Webfonts yay :tada:)
  4. v1.0.02015-09-05 · 2015-09-05 18:57 UTC
    查看更新说明

    New Feature:

    • Multiple API Keys per Account
  5. v1.1.02015-09-05 · 2015-09-05 18:56 UTC
    查看更新说明

    Maintenance and refactor release.

    • Rewritten Screenshot Core of the application
    • Preparations for API v2
    • New Exception Handler (mallinus/exceptions)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    screeenly is an open source web application which lets users create website screenshots through a simple API. It's built with Laravel.

    The latest version is hosted on screeenly.com. You can follow us on Twitter


    ☝️ A completely new version of screeenly has recently been released: https://3.screeenly.com.

    The app has been rebuilt from the ground up. Its API now can also convert websites into PDFs, return the rendered HTML of a website. This now also works for your own provided HTML code. In addition, you can now update a lot more settings; like pixel density or wether images should be loaded.

    The new app requires a paid subscription. The subscription covers server costs and maintenance.

    The open source version of screeenly (this repo right here) which is hosted on http://screeenly.com will remain available for the forseeable future. If anything should change and you've registered on screeenly.com, you will receive a notice.

    The repository runs on Laravel 13.


    Documentation and more

    The wiki holds the documentation.

    Requirements

    • PHP 8.5 or newer
    • Composer 2
    • Node.js 22 or newer and npm
    • A Chrome binary for Puppeteer: npx puppeteer browsers install chrome-headless-shell
    • MySQL, PostgreSQL or SQLite

    Run the tests with vendor/bin/phpunit. Format the code with composer format.

    Build the frontend assets with npm ci && npm run build. The compiled files in public/css, public/js and public/mix-manifest.json are committed. Rebuild and commit them after you change resources/js or resources/sass. npm run dev builds without minification, npm run watch rebuilds on changes.

    Upgrading from Laravel 8 (PHP 8.0)

    1. Switch the server to PHP 8.5 or newer.
    2. Run composer install --no-dev --optimize-autoloader.
    3. Run npm ci, npm run build and npx puppeteer browsers install chrome-headless-shell. Puppeteer 24 needs this separate download.
    4. Update .env:
      • CACHE_DRIVER is now CACHE_STORE. The old name still works.
      • FILESYSTEM_DRIVER is now FILESYSTEM_DISK. The old name still works.
      • MAIL_ENCRYPTION is replaced by MAIL_SCHEME. Use smtps for implicit TLS (port 465). Leave it empty for STARTTLS (port 587).
      • BROADCAST_DRIVER is no longer used. Remove it.
    5. Run php artisan migrate --force, then php artisan optimize.
    6. Restart queue workers and PHP-FPM.

    Self Hosting

    screeenly is quite a simple PHP app. Therefore, it's quite easy to self host the application on your own server.

    Self Hosting on your own Server

    If you're comfortable running your own server follow your self-hosting guide here.

    Laravel Forge

    Deploy script for the site:

    cd $FORGE_SITE_PATH
    git pull origin $FORGE_SITE_BRANCH
    
    $FORGE_COMPOSER install --no-dev --no-interaction --prefer-dist --optimize-autoloader
    
    npm ci
    npx puppeteer browsers install chrome-headless-shell
    
    ( flock -w 10 9 || exit 1
        echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
    
    $FORGE_PHP artisan migrate --force
    $FORGE_PHP artisan optimize
    

    The scheduler runs screeenly:cleanup every hour. Add a Forge scheduled job php artisan schedule:run every minute so it runs.

    Deploy to Zeet

    Deploy

    Otherwise, Zeet makes deploying Screeenly dead simple, just click the button above. This guide will walk you through the configuration needed.

    Deploy to Heroku

    Deploy

    If managing servers is not your thing, we've also written a guide on how to deploy the app to Heroku.
    By using Heroku, you can run your own version of screeenly basically for free.

    Docker Images

    If you're interested in a Docker version of screeenly, you can use the daily built images created by Jacek Szafarkiewicz.

    Please note: We do not provide any support for these Docker Images.

    Security

    If you discover a security vulnerability within this package, please e-mail us at [email protected]. All security vulnerabilities will be promptly addressed.

    LICENSE

    MIT