Skip to main content

nonebot2 群聊快速生成搜索引擎链接

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

nonebot

nonebot-plugin-giyf

适用于 NoneBot2 的搜索引擎插件


Python nonebot2 GitHub license pypi

GitHub issues GitHub release (latest by date including pre-releases) GitHub all releases downloads GitHub contributors GitHub Repo stars


本项目是 Flandrewiki 组件,经简单修改成为独立插件发布。

同时,本插件和 nonebot-plugin-mediawiki 有着类似的结构,至于原因嘛……(ಡωಡ)

用途

如题,Google is your friend,用于指引群友快速 访 (tui)(dao) 谷歌娘(在中国大陆大概就是度娘了~)

使用说明

Tip:本插件的设置系统和 nonebot plugin-mediawiki 基本一致,因此如果你使用过前者,那么本插件的配置应该很容易上手

TL;DR

查询: ?前缀 关键词

添加(全局)搜索引擎: search.add search.add.global

删除(全局)搜索引擎: search.delete search.delete.global

修改(全局)搜索引擎: search.default search.default.global

查看搜索引擎列表: search.list search.list.global

其中所有非全局指令均需要在目标群中进行,所有全局指令均只有Bot管理员能执行

参数说明:

前缀

就是你给这个搜索引擎起的代号,好记就行,例如给谷歌娘叫go,给度娘叫bd,等等。只支持英文和数字

链接:

需要使用搜索引擎的搜索url,而非首页url;这类url的明显特征就是,其中带有%s,并且在搜索时%s会被替换成你的搜索关键字

例如:

Google: https://www.google.com/search?q=%s
Baidu: https://www.baidu.com/s?wd=%s
Bing: https://www.bing.com/search?q=%s
Duckduckgo: https://duckduckgo.com/?q=%s

获取这类链接有三种方法:

  1. 问谷歌

(经过查找,只找到了谷歌和百度的……)

  1. 查看浏览器设置

打开浏览器的搜索引擎设置,这里会出现默认配置好的搜索引擎,以及一些你访问过的搜索引擎。点击“编辑”,在“查询URL”一栏通常就是我们要找的

Tip:部分搜索引擎在此可能显示的有一些变量,例如 {google:baseURL}search?q=%s ,本插件无法识别这种,还请留意
  1. 人工智能(不是

打开你要使用的搜索引擎,随便搜点什么(建议使用英文或数字,中文被编码后根本分不清……),把链接复制下来,把你原先输入的搜索关键字换成%s,大功告成!

Tip:某些搜索引擎的链接可能包含你的一些个人信息,建议在隐私浏览窗口中进行上述操作。
另外,通常情况下,搜索关键词后面的附加参数并不会影响搜索结果,因此一般可以去除
例如: https://www.bing.com/search?q=%s&form=xxxx 其中的 &from=xxxx就可以去掉 

TODO

  • 内置一些常用的搜索引擎,用来快速添加

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-giyf-0.1.0.tar.gz (18.4 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_giyf-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-giyf-0.1.0.tar.gz.

File metadata

  • Download URL: nonebot-plugin-giyf-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.3 Linux/5.16.16-zen1-1-zen

File hashes

Hashes for nonebot-plugin-giyf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56ee11664190f49f02fe70e1391ddb49329bd34e9cf5dcd588c5759becb4ae22
MD5 1360d313269412003416fb5dc950f7c6
BLAKE2b-256 048bf26159ee92b3daf069f4c5d9fca836bf8bd7cb9857a5e64901c23f397433

See more details on using hashes here.

File details

Details for the file nonebot_plugin_giyf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_giyf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.3 Linux/5.16.16-zen1-1-zen

File hashes

Hashes for nonebot_plugin_giyf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cefea861ae98ca3444ad6f657f82ca7300d3ca8cc20fc4fdd6d0796a57de46a
MD5 9d5a23d9c894ebaee49bd0dac7afda11
BLAKE2b-256 07aab87069174a686224bd76a419eb01be9cdeb04948e76daed3f8bedb1ed71a

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