Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cssxsh/web-screenshot-helper
基于 Mirai Selenium Plugin 的 网页截图插件
https://github.com/cssxsh/web-screenshot-helper
mirai mirai-console screenshot
Last synced: 2 months ago
JSON representation
基于 Mirai Selenium Plugin 的 网页截图插件
- Host: GitHub
- URL: https://github.com/cssxsh/web-screenshot-helper
- Owner: cssxsh
- License: agpl-3.0
- Created: 2023-02-20T18:15:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-29T03:07:08.000Z (over 1 year ago)
- Last Synced: 2024-10-03T14:21:32.037Z (3 months ago)
- Topics: mirai, mirai-console, screenshot
- Language: Kotlin
- Homepage:
- Size: 123 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [Web Screenshot Helper](https://github.com/cssxsh/web-screenshot-helper)
> 基于 Mirai Selenium Plugin 的 网页截图插件
相关项目:
[Mirai Selenium Plugin](https://github.com/cssxsh/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](https://github.com/cssxsh/web-screenshot-helper/releases) 或者 [Maven](https://repo1.maven.org/maven2/xyz/cssxsh/web-screenshot-helper/) 下载 `mirai2.jar`
2. 将其放入 `plugins` 文件夹中## [爱发电](https://afdian.net/@cssxsh)
![afdian](.github/afdian.jpg)