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 PyPI - Downloads

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


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

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

用途

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

使用说明

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

TL;DR

查询: ?前缀 关键词

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

快速添加: search.add(.global) [预置的搜索引擎名称] [自定义前缀(可选)]

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

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

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

参数说明:

快速添加

  • 预置的搜索引擎名称:bot内置的引擎名称,目前有 google bing baidu duckduckgo startpage zhwikipedia enwikipedia yahoo yandex
  • 自定义前缀:你可以使用自己的前缀来代替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. 使用搜索引擎

一般用xxx search url(xxx换成你要添加的引擎的名字)当关键词就能搜到

  1. 查看浏览器设置

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

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

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

Tip:某些搜索引擎的链接可能包含你的一些个人信息,建议在隐私浏览窗口中进行上述操作。
另外,搜索关键词后面的很多附加参数并不会影响搜索结果,因此一般可以去除,除非你明确知道它们被用于你想要的用途(例如开关安全搜索)
例如: https://www.bing.com/search?q=%s&form=xxxx 其中的 &from=xxxx就可以去掉 

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.2.tar.gz (19.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_giyf-0.1.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nonebot-plugin-giyf-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b42b0846635304da1c6dbf9650b6f820210b3e36232d2a7831751375cd4d5cce
MD5 0d66220d2f29586123e7f54855a17743
BLAKE2b-256 810f084a15905fb5ce81b327fa1a363147c584590257281643e81059f6ad6df3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nonebot_plugin_giyf-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c35d2f35e55847e725485c6375170b903b136e739155e1479ced7744fcbb832
MD5 4cdee45228ceefad7facb7c4905f7496
BLAKE2b-256 088388e4348611254bd4a5070a01c7dc8f25d568cc63c7301336cff87f549ba0

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