MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    网页截图插件

    插件发布
    2
    3
    324
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cssxsh
      cssxsh last edited by cssxsh

      Web Screenshot Helper

      基于 Mirai Selenium Plugin 的 网页截图插件

      相关项目:
      Mirai Selenium Plugin 前置插件,用于 Selenium 框架的初始化

      权限ID xyz.cssxsh.mirai.plugin.web-screenshot-helper:*

      截图采用的是白名单模式
      你需要在 config/xyz.cssxsh.mirai.plugin.web-screenshot-helper/script 下创建建一个 $host.js 脚本
      例如 www.example.com.js , 脚本的内容决定截图的内容,一般取 return document.body; 即截取整个窗口
      如果想定制特殊的截图效果,比如去除广告,顶栏之类的。可以爱发电投食。

      关键词

      • 截图 https://... 将会启用无头浏览器截取网页图片

      安装

      MCL 指令安装

      请确认 mcl.jar 的版本是 2.1.0+
      ./mcl --update-package xyz.cssxsh:web-screenshot-helper --channel maven-stable --type plugins

      手动安装

      1. 从 Releases 或者 Maven 下载 mirai2.jar
      2. 将其放入 plugins 文件夹中

      爱发电

      afdian-小生化.jpg

      1 Reply Last reply Reply Quote 1
      • cssxsh
        cssxsh last edited by

        打算在下个版本加一些常用网站的脚本作为默认

        1 Reply Last reply Reply Quote 0
        • C
          CloudPast 0 last edited by

          加入涩图网站,完成“又一个涩图插件的诞生”,嘿嘿嘿

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact