A plugin based on NoneBot2 to extract direct links of files in qq group.
Project description
DirectLinker
✨ 一个基于 NoneBot2 的插件,用于提取QQ群文件的直链 ✨
用途
- 配合下载器高速下载
- 分享给不在群里的人
用法
配置文件.env.*
中添加:
COMMAND_START=["/", ""] # 别忘了设置指令前缀,这里只是提醒一下,如果你不知道这个有什么用,请阅读nonebot文档
linker_group=["<QQ群号>"] # 启用插件的群
linker_command="link" # 设置插件触发命令(默认`link`)
演示
假设有一群文件为以下目录结构:
注意:在腾讯的群文件中,允许在同一个文件夹下存在两个文件不同,但是文件名相同的文件
│ foo.txt
| bar.txt
└─Folder1
bar.txt
bar.txt
在群文件根目录有一个bar.txt
,在Folder1
目录下有两个文件bar.txt
和foo.txt
。
/<linker_command> -h
/<linker_command> --help
输出
Manual of 群文件直链提取器
-n | --name 文件名.*
-f | --file 文件序号
-p | --path 文件路径
例:/link -n 文件名.exe
提取文件直链
/<linker_command> -n <文件名>
/<linker_command> --name <文件名>
对于上述目录结构,输入/<linker_command> -n foo.txt
,会直接输出其直链,这是因为在群文件中有且只有一个foo.txt
。
但同样对于bar.txt
,则会输出以下内容:
[Linker]找到了多个文件,请输入`/link -n 文件名.* -f 文件序号`来选择文件
1:上传者 * ,上传时间****-**-** **:**:**
2:上传者 * ,上传时间****-**-** **:**:**
在群文件中存在两个文件名一样的bar.txt
,我们无法直接提取其直链,需要指定某个文件。
/<linker_command> -n <文件名> -f <文件序号>
/<linker_command> --name <文件名> --file <文件序号>
或者,在同文件夹内文件不重复的情况下,可以使用文件路径来提取直链。
/<linker_command> -n <文件名> -p <文件路径>
/<linker_command> --name <文件名> --path <文件路径>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nonebot-plugin-directlinker-2.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf2d299d32839de5929ce80e0ca64a27bba0ceb1217b201a924af7baa81c6a6a |
|
MD5 | 677fc7da0791e955c5b2dcc5ab50288a |
|
BLAKE2b-256 | 3e6a076ac20bcc69626730a2c28bf91509825a777354d305ac71b08ce5dc8e17 |
Hashes for nonebot_plugin_directlinker-2.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bca2686f678e901b52cfe6c3720c6dfb093007d66cb9d608d58a32a88e0d2bd |
|
MD5 | f591aac0ba27aa0f4775b2636e0cbc6d |
|
BLAKE2b-256 | 9919be9d40442ef69c9022cd14ad177a7a3b55fad02bfa1843d099d3b5dd42e0 |