Skip to main content

A plugin based on NoneBot2 to extract direct links of files in qq group.

Project description

DirectLinker

✨ 一个基于 NoneBot2 的插件,用于提取QQ群文件的直链 ✨

用途

  1. 配合下载器高速下载
  2. 分享给不在群里的人

用法

配置文件.env.*中添加:

COMMAND_START=["/", ""]  # 别忘了设置指令前缀,这里只是提醒一下,如果你不知道这个有什么用,请阅读nonebot文档

linker_group=["<QQ群号>"]  # 启用插件的群
linker_command="link" # 设置插件触发命令(默认`link`)

演示

假设有一群文件为以下目录结构:

注意:在腾讯的群文件中,允许在同一个文件夹下存在两个文件不同,但是文件名相同的文件

│ foo.txt
| bar.txt
└─Folder1
    bar.txt
    bar.txt

在群文件根目录有一个bar.txt,在Folder1目录下有两个文件bar.txtfoo.txt

/<linker_command> -h /<linker_command> --help

输出

Manual of 群文件直链提取器
-n | --name     文件名.*
-i | --info     文件序号 
-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 <文件名> -i <文件序号> /<linker_command> --name <文件名> --info <文件序号>

或者,在同文件夹内文件不重复的情况下,可以使用文件路径来提取直链。

对于文件路径,在群文件根目录下请使用/,在子目录下请直接使用子目录名,如Folder

/<linker_command> -n <文件名> -p <文件路径> /<linker_command> --name <文件名> --path <文件路径>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot-plugin-directlinker-2.4.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_directlinker-2.4.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-directlinker-2.4.0.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-directlinker-2.4.0.tar.gz
Algorithm Hash digest
SHA256 913031627a7984fab1adb83bbe51b848baf54c1134c1db442f0d0ddb07954061
MD5 d1b6269939c75ec10cd41b3aac2d1d85
BLAKE2b-256 c5e918081965adf1934b68597af57d9f75466d6b9b61d0421e233f2f2ed88029

See more details on using hashes here.

File details

Details for the file nonebot_plugin_directlinker-2.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_directlinker-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b636c92969bcc124d2b1c78cb83c6694f5243843ea20d2fe4cd878febb55ed86
MD5 28624823e63be1c9f8573cb2fdf54a1c
BLAKE2b-256 cc3ebb01d0c3c7d798bfebe3395735f4c1b1eb08e49334aea7ebc5103a313fd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page