mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-02 05:17:26 +00:00
Compare commits
20 Commits
v2.5.2-202
...
v2.5.2-202
Author | SHA1 | Date | |
---|---|---|---|
d1c7f6f973
|
|||
0727ef4f93
|
|||
73a1caaf46
|
|||
4784f8773b
|
|||
f80b6e72e0
|
|||
05e933838e
|
|||
3045b571a8
|
|||
553212e556
|
|||
5383de7450
|
|||
9964205dc2
|
|||
394c3940e4
|
|||
d3d6f151d4
|
|||
62e3affef1
|
|||
51efc95c1c
|
|||
d5c3a438b0
|
|||
792bfcb1bd
|
|||
cbd7db3570
|
|||
467e7065fa
|
|||
d2240e56fd | |||
eef9f285ca
|
135
README.md
135
README.md
@ -1,41 +1,114 @@
|
||||
# ContentGrabbingJi #
|
||||
Pixiv爬虫一只,同时也是一个机器人/插件!
|
||||
# ContentGrabbingJi - 色图姬 #
|
||||
一个以高性能、高效率为目标,多平台/框架支持、持续维护的Pixiv聊天机器人
|
||||
|
||||
## 支持的机器人平台 ##
|
||||
- [Mirai](https://github.com/mamoe/mirai)
|
||||
- [CoolQ](https://cqp.cc)(基于[`SpringCQ`](https://github.com/lz1998/spring-cq), 不支持多账号使用, 需要使用[`CQHttp`](https://cqhttp.cc/)插件)
|
||||
色图姬存在的目的最初是作为**爬虫 + 机器人**的形式开发,在开发过程中逐渐以多聊天平台,高效率为目标进行。
|
||||
|
||||
## Usage ##
|
||||
> 注意: 运行色图姬前, 你需要准备一个Pixiv账号的会话Cookie存储文件, 否则色图姬将无法运行.
|
||||
> 详见[PixivLoginProxyServer](https://github.com/LamGC/PixivLoginProxyServer)项目的[Readme](https://github.com/LamGC/PixivLoginProxyServer/blob/master/README.md).
|
||||
## 安装 ##
|
||||
### 通过Jar文件部署 ###
|
||||
1. 从项目的[版本页面](https://github.com/LamGC/ContentGrabbingJi/releases)下载最新版色图姬主程序jar文件
|
||||
2. 准备一个目录, 用于存放运行数据(这里以`./runData`为例子).
|
||||
3. 将通过PixivLoginProxyServer获得的Pixiv登录会话文件放置在目录中(`./runData/cookies.store`).
|
||||
4. 使用命令`java -jar <CGJ.jar> buildPassword -password "QQ机器人账号的密码"`构造一个登录用的密码.
|
||||
5. 在数据目录创建一个配置文件`bot.properties`, 并添加如下内容:
|
||||
```properties
|
||||
bot.qq=<机器人QQ账号>
|
||||
bot.password=<通过buildPassword获得的密码>
|
||||
```
|
||||
6. 在数据目录创建新文件夹`setting`, 并创建一个全局配置文件`global.properties`, 然后设置如下内容:
|
||||
```properties
|
||||
# 该配置为全局配置文件, 当群组没有特定配置时, 将使用全局配置.
|
||||
# 管理员QQ (必填)
|
||||
admin.adminId=<管理员QQ号>
|
||||
# 是否允许r18作品
|
||||
image.allowR18=false
|
||||
# 查询排行榜默认的长度(比如15就是发送1~15名的作品), 该选项请适当调整, 设置过长可能导致超出聊天平台的最长消息长度, 导致发送失败!
|
||||
ranking.itemCountLimit=15
|
||||
# 排行榜图片数量(比如排行榜长度为15, 可以设置前10名有图片, 后5名没有图片), 调整该配置可有效控制消息发送所需时间.
|
||||
ranking.imageCountLimit=15
|
||||
# 搜索结果缓存时间, 默认2小时, 单位毫秒
|
||||
cache.searchBody.expire=7200000
|
||||
# 搜索结果长度. 该选项请适当调整, 设置过长可能导致超出聊天平台的最长消息长度, 导致发送失败!
|
||||
search.itemCountLimit=8
|
||||
```
|
||||
7. 配置完成后, 准备一台Redis服务端, 用于缓存数据.
|
||||
8. Redis服务器准备好后, 使用命令启动色图姬:`java -jar <CGJ.jar> botMode -botDataDir <数据目录> -redisAddress <Redis服务器地址> [-proxy 代理服务器地址]`
|
||||
9. 完成!好好享受!
|
||||
|
||||
### Arguments ###
|
||||
> ENV参数名为环境变量名, 用于给Docker容器提供设置方式.
|
||||
### 通过Docker部署 ###
|
||||
使用Docker将可以更好的管理色图姬所使用的资源,和管理色图姬的运行。
|
||||
(正在完善中...)
|
||||
|
||||
- 通用参数
|
||||
- `-proxy` / `ENV: CGJ_PROXY`: (**可选**) 设置代理
|
||||
- 格式: `协议://地址:端口`
|
||||
- 示例: `socks5://127.0.0.1:1080`
|
||||
- 机器人参数
|
||||
- `-botDataDir` / `ENV: CGJ_BOT_DATA_DIR`: (**可选**) 设置`botMode`运行模式下机器人数据存储目录
|
||||
- 格式: `路径`
|
||||
- 示例: `./data`
|
||||
- 默认: `./`
|
||||
- `-redisAddress` / `ENV: CGJ_REDIS_URI`: (**必填, 计划支持可选**) Redis服务器地址
|
||||
- 格式: `地址:端口`
|
||||
- 示例: `127.0.0.1:6379`
|
||||
## 使用 ##
|
||||
### 普通用户 ###
|
||||
将色图姬部署完成,并且让色图姬在某个平台登录完成后,你就可以通过聊天平台向色图姬发起会话了!
|
||||
使用 `.cgj` 向色图姬询问帮助信息!
|
||||
|
||||
> 例如以BotMode启动应用: `java -jar CGJ.jar botMode -proxy "socks5://127.0.0.1:1080 -redisAddress 127.0.0.1:6379`
|
||||
另外,由于色图姬在开发过程中直接使用了原本应用在命令行中的参数解析工具,所以你需要了解一下色图姬命令的格式,
|
||||
色图姬的命令格式为:
|
||||
```bash
|
||||
.cgj <命令> -<参数名> <参数值> ...
|
||||
```
|
||||
如果色图姬无法识别你的命令,那么它会发送一次帮助信息给你。
|
||||
|
||||
### Commands ###
|
||||
- `pluginMode`: CoolQ插件模式(依赖[酷Q机器人](https://cqp.cc/), 支持与CoolQ其他插件共存, 性能耗损大)
|
||||
- `botMode`: Mirai独立模式(机器人独立运行, 不支持与其他插件共存, 性能耗损小)
|
||||
- `collectionDownload`: 收藏下载, 以原图画质下载Cookie所属账号的所有收藏作品
|
||||
- `getRecommends`: 将访问主页获得的推荐作品全部以原图画质下载
|
||||
- `getRankingIllust`: 以原图画质下载指定排行榜类型的全部作品
|
||||
- `search`: 搜索指定内容并获取相关作品信息(不下载)
|
||||
### 管理员用户 ###
|
||||
你应该注意到了,在部署过程中,你需要设置一个管理员QQ的配置,色图姬支持通过命令来管理色图姬的运行。
|
||||
目前支持的管理员命令:
|
||||
```bash
|
||||
# 清除缓存
|
||||
.cgjadmin cleanCache
|
||||
|
||||
> 注意: 除去机器人模式外, 其他功能后续可能会出现改动.
|
||||
# 设置配置项
|
||||
# 如果不使用group参数, 则设置全局配置
|
||||
.cgjadmin setProperty <-key 配置项名> <-value 配置项新值> [-group 指定群组]
|
||||
|
||||
# 查询配置项
|
||||
# 如果不使用group参数, 则查询全局配置
|
||||
.cgjadmin getProperty <-key 配置项名> [-group 指定群组]
|
||||
|
||||
# 保存所有配置
|
||||
.cgjadmin saveProperties
|
||||
|
||||
# 读取所有配置
|
||||
# 使用 reload 参数将会重载所有配置, 而不是覆盖读取
|
||||
.cgjadmin loadProperties [-reload]
|
||||
|
||||
# 运行定时更新任务
|
||||
# 可指定要更新数据的日期
|
||||
.cgjadmin runUpdateTask [-date yyyy-MM-dd]
|
||||
|
||||
# 增加群组作品推送
|
||||
# 如果增加了original参数, 则图片为原图发送
|
||||
# 如果不指定group参数, 则群组为命令发送所在群组
|
||||
.cgjadmin addPushGroup [-group 指定群组号] [-minTime 最小] [-floatTime 随机时间范围] [-rankingStart 排行榜起始排名]
|
||||
[-rankingStop 排行榜结束排名] [-mode 排行榜模式] [-type 排行榜类型] [-original]
|
||||
|
||||
# 删除群组推送功能
|
||||
# 如果不指定group参数, 则群组为命令发送所在群组
|
||||
.cgjadmin removePushGroup [-group 指定群组号]
|
||||
|
||||
# 加载作品推送配置
|
||||
.cgjadmin loadPushList
|
||||
|
||||
# 保存作品推送配置
|
||||
.cgjadmin savePushList
|
||||
|
||||
# 获取被报告的作品列表
|
||||
# 该命令会返回被其他用户报告其存在问题的作品列表
|
||||
.cgjadmin getReportList
|
||||
|
||||
# 解封被报告的作品
|
||||
.cgjadmin unBanArtwork <-id 被ban作品的Id>
|
||||
|
||||
```
|
||||
|
||||
## 贡献 ##
|
||||
向色图姬贡献不一定需要编程知识,向色图姬项目提出意见,反馈问题同样会为色图姬项目提供很大的帮助!
|
||||
如果你在使用色图姬的过程中,遇到了Bug,可以通过色图姬项目的**Issues**使用[Bug反馈模板](https://github.com/LamGC/ContentGrabbingJi/issues/new?assignees=&labels=bug&template=Bug_Report.md&title=)向色图姬提供Bug信息。
|
||||
如果是为色图姬提供一些新功能想法,或者对色图姬有什么意见,则可以直接通过Issues发起讨论。
|
||||
|
||||
如果你会Java开发,又想为色图姬提供一些新功能,可以通过Fork仓库的方法,实现后发起PR,合并到色图姬项目中!
|
||||
向色图姬贡献代码,需要遵循一些贡献事项,如果你的代码不符合这些事项,PR有可能会被关闭!
|
||||
> 注意:色图姬的初衷并没有任何恶意的意图,如果尝试向色图姬提供恶意功能或代码,PR将会被拒绝、关闭。
|
||||
|
||||
## LICENSE ##
|
||||
本项目基于 `GNU Affero General Public License 3.0` 开源许可协议开源,
|
||||
|
47
documents/interfaces/Pixiv搜索推荐候选接口.md
Normal file
47
documents/interfaces/Pixiv搜索推荐候选接口.md
Normal file
@ -0,0 +1,47 @@
|
||||
## 搜索推荐接口 ##
|
||||
### 说明 ###
|
||||
可用于优化搜索内容。
|
||||
|
||||
### 接口地址 ###
|
||||
```
|
||||
GET https://www.pixiv.net/rpc/cps.php?
|
||||
```
|
||||
|
||||
- 是否需要登录: `否`
|
||||
- 是否为Pixiv标准接口返回格式: `否`
|
||||
- 是否需要Referer请求头: `是`
|
||||
|
||||
> 补充: Referer请求头只要是Pixiv的就可以了.
|
||||
|
||||
### 参数 ###
|
||||
Url参数:
|
||||
- `keyword`: 搜索内容
|
||||
|
||||
> 注意: 搜索内容需要进行Url编码(空格要转换成`%20`而不是`+`)
|
||||
### 请求示例 ###
|
||||
```
|
||||
GET https://www.pixiv.net/rpc/cps.php?keyword=幸运星
|
||||
```
|
||||
|
||||
### 返回数据 ###
|
||||
#### 数据示例 ####
|
||||
```json
|
||||
{
|
||||
"candidates":[
|
||||
{
|
||||
"tag_name":"\u3089\u304d\u2606\u3059\u305f",
|
||||
"access_count":"68286498",
|
||||
"tag_translation":"\u5e78\u8fd0\u661f",
|
||||
"type":"tag_translation"
|
||||
}, // ...
|
||||
]
|
||||
}
|
||||
```
|
||||
#### 字段说明 ####
|
||||
- `candidates`: (`Object[]`) 搜索推荐候选列表
|
||||
- `tag_name`: (`string`) 推荐词原名
|
||||
- `access_count`: (`string` -> `number`) 推荐词访问量
|
||||
- `tag_translation`: (`string`) 推荐词对应翻译名
|
||||
- `type`: (`string`) 推荐词类型
|
||||
- `tag_translation`: 标签翻译信息
|
||||
- `prefix`: 前缀
|
319
documents/interfaces/Pixiv预加载数据.md
Normal file
319
documents/interfaces/Pixiv预加载数据.md
Normal file
@ -0,0 +1,319 @@
|
||||
## Pixiv预加载数据 ##
|
||||
### 说明 ###
|
||||
作品预加载数据仅在加载作品页面时存在,处理后删除。
|
||||
### 接口地址 ###
|
||||
```
|
||||
GET https://www.pixiv.net/artworks/{IllustId}
|
||||
```
|
||||
|
||||
- 是否需要登录: `是`
|
||||
- 是否为Pixiv标准接口返回格式: `否`
|
||||
- 是否需要Referer请求头: `否`
|
||||
|
||||
### 参数 ###
|
||||
Url参数:
|
||||
- `IllustId`: 作品Id
|
||||
|
||||
### 请求示例 ###
|
||||
```
|
||||
GET https://www.pixiv.net/artworks/82647306
|
||||
```
|
||||
|
||||
### 返回数据 ###
|
||||
> 注意: 该接口返回HTML格式数据,并不是JSON格式数据。
|
||||
预加载数据需要对返回的Html数据进行解析,路径如下:
|
||||
- CSS Select: meta#meta-preload-data
|
||||
- html>head>meta#meta-preload-data
|
||||
|
||||
获得标签后,获取`content`属性即可获得预加载数据内容
|
||||
|
||||
#### 数据示例 ####
|
||||
```json
|
||||
{
|
||||
"timestamp":"2020-07-01T11:32:30+09:00",
|
||||
"illust":{
|
||||
"82647306":{
|
||||
"illustId":"82647306",
|
||||
"illustTitle":"水着キャルちゃん!",
|
||||
"illustComment":"水着のキャルちゃんはかわいいぞ!!",
|
||||
"id":"82647306",
|
||||
"title":"水着キャルちゃん!",
|
||||
"description":"水着のキャルちゃんはかわいいぞ!!",
|
||||
"illustType":0,
|
||||
"createDate":"2020-06-29T12:28:06+00:00",
|
||||
"uploadDate":"2020-06-29T12:28:06+00:00",
|
||||
"restrict":0,
|
||||
"xRestrict":0,
|
||||
"sl":2,
|
||||
"urls":{
|
||||
"mini":"https://i.pximg.net/c/48x48/img-master/img/2020/06/29/21/28/06/82647306_p0_square1200.jpg",
|
||||
"thumb":"https://i.pximg.net/c/250x250_80_a2/img-master/img/2020/06/29/21/28/06/82647306_p0_square1200.jpg",
|
||||
"small":"https://i.pximg.net/c/540x540_70/img-master/img/2020/06/29/21/28/06/82647306_p0_master1200.jpg",
|
||||
"regular":"https://i.pximg.net/img-master/img/2020/06/29/21/28/06/82647306_p0_master1200.jpg",
|
||||
"original":"https://i.pximg.net/img-original/img/2020/06/29/21/28/06/82647306_p0.jpg"
|
||||
},
|
||||
"tags":{
|
||||
"authorId":"55859246",
|
||||
"isLocked":false,
|
||||
"tags":[
|
||||
{
|
||||
"tag":"プリンセスコネクト!Re:Dive",
|
||||
"locked":true,
|
||||
"deletable":false,
|
||||
"userId":"55859246",
|
||||
"translation":{
|
||||
"en":"公主连结Re:Dive"
|
||||
},
|
||||
"userName":"秋鳩むぎ"
|
||||
}, // ...
|
||||
],
|
||||
"writable":true
|
||||
},
|
||||
"alt":"#プリンセスコネクト!Re:Dive 水着キャルちゃん! - 秋鳩むぎ的插画",
|
||||
"storableTags":[
|
||||
"_bee-JX46i",
|
||||
"nAtxkwJ5Sy",
|
||||
"q303ip6Ui5"
|
||||
],
|
||||
"userId":"55859246",
|
||||
"userName":"秋鳩むぎ",
|
||||
"userAccount":"pigeonwheat",
|
||||
"userIllusts":{
|
||||
"82647306":{
|
||||
"illustId":"82647306",
|
||||
"illustTitle":"水着キャルちゃん!",
|
||||
"id":"82647306",
|
||||
"title":"水着キャルちゃん!",
|
||||
"illustType":0,
|
||||
"xRestrict":0,
|
||||
"restrict":0,
|
||||
"sl":2,
|
||||
"url":"https://i.pximg.net/c/250x250_80_a2/img-master/img/2020/06/29/21/28/06/82647306_p0_square1200.jpg",
|
||||
"description":"水着のキャルちゃんはかわいいぞ!!",
|
||||
"tags":[
|
||||
"プリンセスコネクト!Re:Dive",
|
||||
"キャル(プリコネ)",
|
||||
"おへそ"
|
||||
],
|
||||
"userId":"55859246",
|
||||
"userName":"秋鳩むぎ",
|
||||
"width":2000,
|
||||
"height":3000,
|
||||
"pageCount":1,
|
||||
"isBookmarkable":true,
|
||||
"bookmarkData":null,
|
||||
"alt":"#プリンセスコネクト!Re:Dive 水着キャルちゃん! - 秋鳩むぎ的插画",
|
||||
"isAdContainer":false,
|
||||
"titleCaptionTranslation":{
|
||||
"workTitle":null,
|
||||
"workCaption":null
|
||||
},
|
||||
"createDate":"2020-06-29T21:28:06+09:00",
|
||||
"updateDate":"2020-06-29T21:28:06+09:00",
|
||||
"seriesId":null,
|
||||
"seriesTitle":null
|
||||
}
|
||||
},
|
||||
"likeData":false,
|
||||
"width":2000,
|
||||
"height":3000,
|
||||
"pageCount":1,
|
||||
"bookmarkCount":39,
|
||||
"likeCount":31,
|
||||
"commentCount":2,
|
||||
"responseCount":0,
|
||||
"viewCount":239,
|
||||
"isHowto":false,
|
||||
"isOriginal":false,
|
||||
"imageResponseOutData":[
|
||||
],
|
||||
"imageResponseData":[
|
||||
],
|
||||
"imageResponseCount":0,
|
||||
"pollData":null,
|
||||
"seriesNavData":null,
|
||||
"descriptionBoothId":null,
|
||||
"descriptionYoutubeId":null,
|
||||
"comicPromotion":null,
|
||||
"fanboxPromotion":null,
|
||||
"contestBanners":[
|
||||
],
|
||||
"isBookmarkable":true,
|
||||
"bookmarkData":null,
|
||||
"contestData":null,
|
||||
"zoneConfig":{
|
||||
"responsive":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=illust_responsive&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua3yznnr7lz&num=5efbf5be273&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"rectangle":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=illust_rectangle&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua42776dfuu&num=5efbf5be810&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"500x500":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=bigbanner&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua442sjsueo&num=5efbf5be568&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"header":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=header&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua45spzoimt&num=5efbf5be155&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"footer":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=footer&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua47f9zcoim&num=5efbf5be400&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"expandedFooter":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=multiple_illust_viewer&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua4928ct0yw&num=5efbf5be471&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
},
|
||||
"logo":{
|
||||
"url":"https://pixon.ads-pixiv.net/show?zone_id=logo_side&format=js&s=1&up=0&a=22&ng=w&l=zh&uri=%2Fartworks%2F_PARAM_&is_spa=1&K=59bba275c645c&ab_test_digits_first=32&yuid=NDJ3gQk&suid=Pggb9mua4aqu6i4sr&num=5efbf5be844&t=_bee-JX46i&t=b8b4-hqot7&t=kY01H5r3Pd"
|
||||
}
|
||||
},
|
||||
"extraData":{
|
||||
"meta":{
|
||||
"title":"#プリンセスコネクト!Re:Dive 水着キャルちゃん! - 秋鳩むぎ的插画 - pixiv",
|
||||
"description":"この作品 「水着キャルちゃん!」 は 「プリンセスコネクト!Re:Dive」「キャル(プリコネ)」 等のタグがつけられた「秋鳩むぎ」さんのイラストです。 「水着のキャルちゃんはかわいいぞ!!」",
|
||||
"canonical":"https://www.pixiv.net/artworks/82647306",
|
||||
"alternateLanguages":{
|
||||
"ja":"https://www.pixiv.net/artworks/82647306",
|
||||
"en":"https://www.pixiv.net/en/artworks/82647306"
|
||||
},
|
||||
"descriptionHeader":"本作「水着キャルちゃん!」为附有「プリンセスコネクト!Re:Dive」「キャル(プリコネ)」等标签的插画。",
|
||||
"ogp":{
|
||||
"description":"水着のキャルちゃんはかわいいぞ!!",
|
||||
"image":"https://embed.pixiv.net/decorate.php?illust_id=82647306",
|
||||
"title":"#プリンセスコネクト!Re:Dive 水着キャルちゃん! - 秋鳩むぎ的插画 - pixiv",
|
||||
"type":"article"
|
||||
},
|
||||
"twitter":{
|
||||
"description":"水着のキャルちゃんはかわいいぞ!!",
|
||||
"image":"https://embed.pixiv.net/decorate.php?illust_id=82647306",
|
||||
"title":"水着キャルちゃん!",
|
||||
"card":"summary_large_image"
|
||||
}
|
||||
}
|
||||
},
|
||||
"titleCaptionTranslation":{
|
||||
"workTitle":null,
|
||||
"workCaption":null
|
||||
}
|
||||
}
|
||||
},
|
||||
"user":{
|
||||
"55859246":{
|
||||
"userId":"55859246",
|
||||
"name":"秋鳩むぎ",
|
||||
"image":"https://i.pximg.net/user-profile/img/2020/06/29/21/20/14/18907670_b3f87d819f705ec418f120cd57f9dc41_50.jpg",
|
||||
"imageBig":"https://i.pximg.net/user-profile/img/2020/06/29/21/20/14/18907670_b3f87d819f705ec418f120cd57f9dc41_170.jpg",
|
||||
"premium":false,
|
||||
"isFollowed":false,
|
||||
"isMypixiv":false,
|
||||
"isBlocking":false,
|
||||
"background":null,
|
||||
"partial":0
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
#### 字段说明 ####
|
||||
- `timestamp`: (`string`) 请求时间
|
||||
- `illust`: (`Object`) 作品预加载信息
|
||||
- `{illustId}`: 作品ID(跟页面请求的IllustId一样)
|
||||
- `illustId`: (`string` -> `number`) 作品Id
|
||||
- `illustTitle`: (`string`) 作品标题
|
||||
- `illustComment`: (`string`) 作品说明
|
||||
- `id`: (`string` -> `number`) 与`illustId`一致, 猜测是以兼容旧版本为目录而存在
|
||||
- `title`: (`string`) 与`illustTitle`一致, 猜测是以兼容旧版本为目录而存在
|
||||
- `description`: (`string`) 作品说明
|
||||
- `illustType`: (`number`) 作品类型
|
||||
- `0`: 插画作品
|
||||
- `1`: 漫画作品
|
||||
- `2`: 动图作品
|
||||
- `createDate`: (`string`) 作品创建时间(或者是完成时间?)
|
||||
- `updateDate`: (`string`) 作品上传时间
|
||||
- `restrict`: (`number`) 作品限制级(意义不明, 可能是兼容性问题?)?
|
||||
- `xRestrict`: (`number`) 作品是否为限制级, 基本准确, 少部分不一定(看Pixiv审核怎么理解了)
|
||||
- `0`: 非限制级内容(即非R18作品)
|
||||
- `1`: 限制级内容(即R18作品)
|
||||
- `sl`: (`number`) 不明?
|
||||
- `urls`: (`string`) 作品图片链接, 需要`Referer`请求头
|
||||
- `mini`: (`string`) 小尺寸预览图
|
||||
- `thumb`: (`string`) 小尺寸预览图
|
||||
- `small`: (`string`) 小尺寸预览图
|
||||
- `regular`: (`string`) 经压缩,没啥画质损失的原尺寸预览图
|
||||
- `original`: (`string`) 原图
|
||||
- `tags`: (`Object`) 作品标签信息
|
||||
- `authorId`: (`string` -> `number`) 作者用户Id
|
||||
- `isLocked`: (`boolean`) 标签是否锁定(即不可被访客更改)
|
||||
- `tags`: (`Object[]`) 标签信息数组
|
||||
- `tag`: (`string`) 标签原始名
|
||||
- `locked`: (`boolean`) 标签是否不可更改
|
||||
- `deletable`: (`boolean`) 标签能否被删除?
|
||||
- `userId`: (`string` -> `number`) 用户Id
|
||||
- `translation`: (`Object`) 标签翻译
|
||||
- `{语种}`: 翻译名
|
||||
- `userName`: (`string`) 用户名
|
||||
- `alt`: (`string`) 简略介绍信息(在图片加载失败时可提供给`img`标签使用)
|
||||
- `storableTags`: (`string[]`) 不明?
|
||||
- `userId`: (`string` -> `number`) 作者用户Id
|
||||
- `userName`: (`string`) 作者用户名
|
||||
- `userAccount`: (`string`) 作者登录名
|
||||
- `userIllusts`: (`Object`) 作品信息?
|
||||
- `{IllustId}`: 与请求IllustId一样
|
||||
- (请转到:Pixiv作品信息获取接口.md)
|
||||
- `likeData`: (`boolean?`) 不明?
|
||||
- `width`: (`number`) 作品长度
|
||||
- `height`: (`number`) 作品高度
|
||||
- `pageCount`: (`number`) 作品页数
|
||||
- `bookmarkCount`: (`number`) 作品公开的收藏数
|
||||
- `likeCount`: (`number`) 作品喜欢(点赞)数
|
||||
- `commentCount`: (`number`) 作品评论数
|
||||
- `responseCount`: (`number`) 作品响应数?
|
||||
- `viewCount`: (`number`) 作品阅览数
|
||||
- `isHowto`: (`boolean`) 不明?
|
||||
- `isOriginal`: (`boolean`) 不明?
|
||||
- `imageResponseOutData`: (`Unknown[]`) 不明?
|
||||
- `imageResponseData`: (`Unknown[]`) 不明?
|
||||
- `imageResponseCount`: (`number`) 不明?
|
||||
- `pollData`: (`Unknown`) 不明?
|
||||
- `seriesNavData`: (`Unknown`) 不明?
|
||||
- `descriptionBoothId`: (`Unknown`) 不明?
|
||||
- `descriptionYoutubeId`: (`Unknown`) 不明?
|
||||
- `comicPromotion`: (`Unknown`) 不明?
|
||||
- `fanboxPromotion`: (`Unknown`) 不明?
|
||||
- `contestBanners`: (`Unknown[]`) 不明?
|
||||
// TODO 待补充
|
||||
|
||||
- `isBookmarkable`: (`boolean`) 不明?
|
||||
- `bookmarkData`: (`Unknown`) 不明?
|
||||
- `contestData`: (`Unknown`) 不明?
|
||||
- `zoneConfig`: (`Object`) 猜测是广告信息?
|
||||
- (基本不用, 忽略...)
|
||||
- `extraData`: (`Object`) 扩展数据
|
||||
- `meta`: (`Object`) 元数据
|
||||
- `title`: (`string`) 网页标题
|
||||
- `description`: (`string`) Pixiv生成的作品说明
|
||||
- `canonical`: (`string`) 作品页面链接
|
||||
- `alternateLanguages`: (`Object`) 不同语言的作品页面链接
|
||||
- `{语种}`: (`string`) 对应语种的作品链接
|
||||
- `descriptionHeader`: (`string`) 说明文档(不过似乎是对应了会话所属账号的语种?)
|
||||
- `ogp`: (`Object`) 猜测是某平台的分享数据?
|
||||
- `description`: (`string`) 说明内容
|
||||
- `image`: (`string`) 预览图链接
|
||||
- `title`: (`string`) 分享标题
|
||||
- `type`: (`string`) 分享类型?
|
||||
- `twitter`: (`Object`)
|
||||
- `description`: (`string`) 说明内容
|
||||
- `image`: (`string`) 预览图链接
|
||||
- `title`: (`string`) 分享标题
|
||||
- `card`: (`string`) 分享类型?
|
||||
- `titleCaptionTranslation`: (`Object`) 不明?
|
||||
- `workTitle`: (`Unknown`) 不明?
|
||||
- `workCaption`: (`Unknown`) 不明?
|
||||
- `user`: (`Object`) 作者预加载信息
|
||||
- `{userId}`: 可通过`illust.{illustId}.userId`获得
|
||||
- `userId`: (`string` -> `number`) 作者用户Id
|
||||
- `name`: (`string`) 作者用户名
|
||||
- `image`: (`string`) 作者用户头像(小尺寸)
|
||||
- `imageBig`: (`string`) 作者用户头像(大尺寸)
|
||||
- `premium`: (`boolean`) 作者是否为Pixiv会员
|
||||
- `isFollowed`: (`boolean`) 当前会话用户是否已关注
|
||||
- `isMypixiv`: (`boolean`) 是否为当前会话本人?
|
||||
- `isBlocking`: (`boolean`) 是否正在被封禁
|
||||
- `background`: (`Object`) 背景图片?
|
||||
- `partial`: (`number`) 不明?
|
8
pom.xml
8
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.lamgc</groupId>
|
||||
<artifactId>ContentGrabbingJi</artifactId>
|
||||
<version>2.5.2-20200630.2-SNAPSHOT</version>
|
||||
<version>2.5.2-20200709.1-SNAPSHOT</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
@ -27,7 +27,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
<mirai.CoreVersion>1.0.2</mirai.CoreVersion>
|
||||
<mirai.CoreVersion>1.0.4</mirai.CoreVersion>
|
||||
<mirai.JaptVersion>1.1.1</mirai.JaptVersion>
|
||||
<kotlin.version>1.3.71</kotlin.version>
|
||||
<ktor.version>1.3.2</ktor.version>
|
||||
@ -94,7 +94,7 @@
|
||||
<dependency>
|
||||
<groupId>net.lamgc</groupId>
|
||||
<artifactId>java-utils</artifactId>
|
||||
<version>1.2.0_20200517.1-SNAPSHOT</version>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -121,7 +121,7 @@
|
||||
<dependency>
|
||||
<groupId>net.lz1998</groupId>
|
||||
<artifactId>spring-cq</artifactId>
|
||||
<version>4.14.0.6</version>
|
||||
<version>4.15.0.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
|
@ -8,7 +8,7 @@ import com.google.gson.JsonObject;
|
||||
import net.lamgc.cgj.bot.boot.ApplicationBoot;
|
||||
import net.lamgc.cgj.bot.boot.BotGlobal;
|
||||
import net.lamgc.cgj.bot.framework.cli.ConsoleMain;
|
||||
import net.lamgc.cgj.bot.framework.coolq.CQConfig;
|
||||
import net.lamgc.cgj.bot.framework.coolq.SpringCQApplication;
|
||||
import net.lamgc.cgj.bot.framework.mirai.MiraiMain;
|
||||
import net.lamgc.cgj.pixiv.PixivDownload;
|
||||
import net.lamgc.cgj.pixiv.PixivSearchLinkBuilder;
|
||||
@ -25,20 +25,15 @@ import org.apache.http.util.EntityUtils;
|
||||
import org.apache.tomcat.util.http.fileupload.util.Streams;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Main {
|
||||
|
||||
private final static Logger log = LoggerFactory.getLogger(Main.class);
|
||||
@ -105,17 +100,7 @@ public class Main {
|
||||
|
||||
@Command
|
||||
public static void pluginMode(@Argument(name = "args", force = false) String argsStr) {
|
||||
log.info("酷Q机器人根目录: {}", BotGlobal.getGlobal().getDataStoreDir().getPath());
|
||||
CQConfig.init();
|
||||
Pattern pattern = Pattern.compile("/\\s*(\".+?\"|[^:\\s])+((\\s*:\\s*(\".+?\"|[^\\s])+)|)|(\".+?\"|[^\"\\s])+");
|
||||
Matcher matcher = pattern.matcher(Strings.nullToEmpty(argsStr));
|
||||
ArrayList<String> argsList = new ArrayList<>();
|
||||
while (matcher.find()) {
|
||||
argsList.add(matcher.group());
|
||||
}
|
||||
String[] args = new String[argsList.size()];
|
||||
argsList.toArray(args);
|
||||
SpringApplication.run(Main.class, args);
|
||||
new SpringCQApplication().start(argsStr);
|
||||
}
|
||||
|
||||
@Command
|
||||
|
@ -4,7 +4,6 @@ import com.google.common.base.Throwables;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@ -23,7 +22,7 @@ public class RandomIntervalSendTimer extends TimerTask {
|
||||
private final long time;
|
||||
private final int floatTime;
|
||||
private final AtomicBoolean loop = new AtomicBoolean();
|
||||
private final AtomicBoolean start = new AtomicBoolean();
|
||||
private final AtomicBoolean running = new AtomicBoolean();
|
||||
private final String hashId = Integer.toHexString(this.hashCode());
|
||||
|
||||
|
||||
@ -88,7 +87,6 @@ public class RandomIntervalSendTimer extends TimerTask {
|
||||
this.sender = sender;
|
||||
this.time = time;
|
||||
this.floatTime = floatTime;
|
||||
timerMap.put(timerId, this);
|
||||
if(startNow) {
|
||||
start(loop);
|
||||
}
|
||||
@ -108,21 +106,18 @@ public class RandomIntervalSendTimer extends TimerTask {
|
||||
Date nextDate = new Date();
|
||||
nextDate.setTime(nextDate.getTime() + nextDelay);
|
||||
log.info("定时器 {} 下一延迟: {}ms ({})", hashId, nextDelay, nextDate);
|
||||
if(start.get()) {
|
||||
try {
|
||||
Field state = this.getClass().getSuperclass().getDeclaredField("state");
|
||||
state.setAccessible(true);
|
||||
state.setInt(this, 0);
|
||||
state.setAccessible(false);
|
||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
if(running.get()) {
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
start.set(true);
|
||||
running.set(true);
|
||||
timer.schedule(this, nextDelay);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
timerMap.put(timerId, (RandomIntervalSendTimer) clone());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
log.info("定时器 {} 开始执行...(Sender: {}@{})", this.hashId, sender.getClass().getSimpleName(), sender.hashCode());
|
||||
@ -145,7 +140,7 @@ public class RandomIntervalSendTimer extends TimerTask {
|
||||
*/
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
start.set(false);
|
||||
running.set(false);
|
||||
loop.set(false);
|
||||
return super.cancel();
|
||||
}
|
||||
@ -158,4 +153,18 @@ public class RandomIntervalSendTimer extends TimerTask {
|
||||
timerMap.remove(this.timerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 克隆一个参数完全一样的TimerTask对象.
|
||||
* @return 返回对象不同, 参数相同的TimerTask对象.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("MethodDoesntCallSuperMethod")
|
||||
public Object clone() {
|
||||
RandomIntervalSendTimer newTimerTask = new RandomIntervalSendTimer(
|
||||
this.timerId, this.sender,
|
||||
time, floatTime,
|
||||
running.get(), loop.get());
|
||||
this.destroy();
|
||||
return newTimerTask;
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ public class LocalHashCacheStore<T> implements CacheStore<T>, Cleanable {
|
||||
expireKeySet.forEach(cache::remove);
|
||||
}
|
||||
|
||||
public static class CacheObject<T> implements Comparable<CacheObject<T>> {
|
||||
private static class CacheObject<T> implements Comparable<CacheObject<T>> {
|
||||
|
||||
private final AtomicReference<T> value;
|
||||
private final AtomicReference<Date> expire;
|
||||
|
@ -1,27 +0,0 @@
|
||||
package net.lamgc.cgj.bot.framework.coolq;
|
||||
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import net.lz1998.cq.CQGlobal;
|
||||
import net.lz1998.cq.EnableCQ;
|
||||
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@EnableCQ
|
||||
public class CQConfig {
|
||||
|
||||
public static void init() {
|
||||
CQGlobal.pluginList.add(CQPluginMain.class);
|
||||
CQGlobal.executor = new ThreadPoolExecutor(
|
||||
(int) Math.ceil(Runtime.getRuntime().availableProcessors() / 2F),
|
||||
Runtime.getRuntime().availableProcessors(),
|
||||
25, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<>(512),
|
||||
new ThreadFactoryBuilder()
|
||||
.setNameFormat("Plugin-ProcessThread-%d")
|
||||
.build()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ package net.lamgc.cgj.bot.framework.coolq;
|
||||
import net.lamgc.cgj.bot.boot.ApplicationBoot;
|
||||
import net.lamgc.cgj.bot.event.BotEventHandler;
|
||||
import net.lamgc.cgj.bot.framework.coolq.message.SpringCQMessageEvent;
|
||||
import net.lamgc.cgj.bot.framework.coolq.message.SpringCQMessageSenderFactory;
|
||||
import net.lamgc.utils.event.EventHandler;
|
||||
import net.lz1998.cq.event.message.CQDiscussMessageEvent;
|
||||
import net.lz1998.cq.event.message.CQGroupMessageEvent;
|
||||
@ -13,13 +14,15 @@ import net.lz1998.cq.robot.CoolQ;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@Component
|
||||
@SuppressWarnings("unused")
|
||||
public class CQPluginMain extends CQPlugin implements EventHandler {
|
||||
|
||||
private final static AtomicBoolean initialState = new AtomicBoolean();
|
||||
|
||||
public CQPluginMain() {
|
||||
// TODO(LamGC, 2020.04.21): SpringCQ无法适配MessageSenderBuilder
|
||||
// MessageSenderBuilder.setCurrentMessageSenderFactory(new SpringCQMessageSenderFactory());
|
||||
ApplicationBoot.initialBot();
|
||||
LoggerFactory.getLogger(CQPluginMain.class)
|
||||
.info("BotEventHandler.COMMAND_PREFIX = {}", BotEventHandler.COMMAND_PREFIX);
|
||||
}
|
||||
@ -46,6 +49,13 @@ public class CQPluginMain extends CQPlugin implements EventHandler {
|
||||
* @return 是否拦截消息
|
||||
*/
|
||||
private static int processMessage(CoolQ cq, CQMessageEvent event) {
|
||||
SpringCQMessageSenderFactory.setCoolQ(cq);
|
||||
synchronized (initialState) {
|
||||
if(!initialState.get()) {
|
||||
ApplicationBoot.initialBot();
|
||||
initialState.set(true);
|
||||
}
|
||||
}
|
||||
if(BotEventHandler.mismatch(event.getMessage())) {
|
||||
return MESSAGE_IGNORE;
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package net.lamgc.cgj.bot.framework.coolq;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import net.lamgc.cgj.bot.boot.BotGlobal;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.event.ApplicationFailedEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.event.ContextClosedEvent;
|
||||
import org.springframework.context.event.ContextStoppedEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SpringCQApplication {
|
||||
|
||||
private final static Logger log = LoggerFactory.getLogger(SpringCQApplication.class);
|
||||
|
||||
private final Object quitLock = new Object();
|
||||
|
||||
public void start(String argsStr) {
|
||||
log.info("酷Q机器人根目录: {}", BotGlobal.getGlobal().getDataStoreDir().getPath());
|
||||
Pattern pattern = Pattern.compile("/\\s*(\".+?\"|[^:\\s])+((\\s*:\\s*(\".+?\"|[^\\s])+)|)|(\".+?\"|[^\"\\s])+");
|
||||
Matcher matcher = pattern.matcher(Strings.nullToEmpty(argsStr));
|
||||
ArrayList<String> argsList = new ArrayList<>();
|
||||
while (matcher.find()) {
|
||||
argsList.add(matcher.group());
|
||||
}
|
||||
String[] args = new String[argsList.size()];
|
||||
argsList.toArray(args);
|
||||
ConfigurableApplicationContext context = SpringApplication.run(SpringCQApplication.class, args);
|
||||
registerShutdownHook(context);
|
||||
try {
|
||||
synchronized (quitLock) {
|
||||
quitLock.wait();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
log.warn("发生中断, 退出SpringCQ...", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void registerShutdownHook(ConfigurableApplicationContext context) {
|
||||
context.addApplicationListener((ApplicationListener<ApplicationFailedEvent>)
|
||||
event -> notifyThread());
|
||||
context.addApplicationListener((ApplicationListener<ContextClosedEvent>)
|
||||
event -> notifyThread());
|
||||
context.addApplicationListener((ApplicationListener<ContextStoppedEvent>)
|
||||
event -> notifyThread());
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(this::notifyThread));
|
||||
}
|
||||
|
||||
private void notifyThread() {
|
||||
synchronized (quitLock) {
|
||||
quitLock.notify();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -6,13 +6,26 @@ import net.lamgc.cgj.bot.message.MessageSource;
|
||||
import net.lz1998.cq.robot.CoolQ;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class SpringCQMessageSenderFactory implements MessageSenderFactory {
|
||||
|
||||
private final static ThreadLocal<CoolQ> threadCoolQ = new ThreadLocal<>();
|
||||
private final static AtomicReference<CoolQ> coolQ = new AtomicReference<>();
|
||||
|
||||
/**
|
||||
* 设置CoolQ对象.
|
||||
* <p>该方法仅接受第一次设置的CoolQ对象, 其他对象将会忽略.</p>
|
||||
* @param coolQObj CoolQ对象
|
||||
*/
|
||||
public static void setCoolQ(CoolQ coolQObj) {
|
||||
if(coolQ.get() == null) {
|
||||
coolQ.set(coolQObj);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageSender createMessageSender(MessageSource source, long id) {
|
||||
return new SpringCQMessageSender(
|
||||
Objects.requireNonNull(threadCoolQ.get(), "CoolQ object is not included in ThreadLocal"), source, id);
|
||||
Objects.requireNonNull(coolQ.get(), "CoolQ object not ready"), source, id);
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
server.port=8081
|
||||
server.tomcat.max-threads=1
|
12
src/main/resources/application.yml
Normal file
12
src/main/resources/application.yml
Normal file
@ -0,0 +1,12 @@
|
||||
server:
|
||||
port: 8081
|
||||
|
||||
spring:
|
||||
cq:
|
||||
plugin-list:
|
||||
- net.lamgc.cgj.bot.framework.coolq.CQPluginMain
|
||||
event:
|
||||
corePoolSize: 8
|
||||
maxPoolSize: 16
|
||||
keepAliveTime: 25000
|
||||
workQueueSize: 1024
|
Reference in New Issue
Block a user