mirror of
				https://github.com/suyiiyii/nonebot-bison.git
				synced 2025-11-04 21:44:52 +08:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			b04cbc2ced
			...
			6b6bf9d8f8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					6b6bf9d8f8 | ||
| 54d37e254d | |||
| 8fa456bc4e | 
							
								
								
									
										
											BIN
										
									
								
								docs/.vuepress/public/images/add-cookie-2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/.vuepress/public/images/add-cookie-2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 90 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/.vuepress/public/images/add-cookie.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/.vuepress/public/images/add-cookie.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 56 KiB  | 
@ -272,6 +272,21 @@ Bison 在处理每条推送时,会按照以下规则顺序检查推送中的 T
 | 
			
		||||
3. **需订阅 Tag** 列表为空
 | 
			
		||||
   - **发送**该推送到群中,检查结束
 | 
			
		||||
 | 
			
		||||
#### Cookie 功能
 | 
			
		||||
 | 
			
		||||
Bison 支持携带 Cookie 进行请求。
 | 
			
		||||
 | 
			
		||||
目前支持的平台有:
 | 
			
		||||
 | 
			
		||||
- `rss`: RSS
 | 
			
		||||
- `weibo`: 新浪微博
 | 
			
		||||
 | 
			
		||||
::: warning 使用须知
 | 
			
		||||
Cookie 全局生效,这意味着,通过你的 Cookie 获取到的内容,可能会被发给其他用户。
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
管理员可以通过**命令**或**管理后台**给 Bison 设置 Cookie。
 | 
			
		||||
 | 
			
		||||
<script setup lang="ts">
 | 
			
		||||
import { ref, computed } from 'vue';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -149,3 +149,35 @@ Bison 所给的链接中的 ip 和 port 是`BISON_OUTER_URL`配置决定的,
 | 
			
		||||
:bug:
 | 
			
		||||
在浏览器输入网址进入网页时,第一次进入可能会出现 unauthorized,请再输入网址重新进入一次,而**不能**简单的刷新页面
 | 
			
		||||
:::
 | 
			
		||||
 | 
			
		||||
## :children_crossing: 魔法饼干
 | 
			
		||||
 | 
			
		||||
Bison 支持携带 Cookie 进行请求。
 | 
			
		||||
 | 
			
		||||
如果需要让 Bison 携带 Cookie 进行请求,需要先使用 `添加cookie` 命令添加 Cookie,然后使用 `添加关联cookie` 命令将 Cookie 关联到订阅上。
 | 
			
		||||
 | 
			
		||||
只有 `superuser` 可以管理 Cookie,只支持私聊。
 | 
			
		||||
 | 
			
		||||
打开 Bison 的私聊,发送 `添加cookie` 命令,Bison 会开始添加 Cookie 流程。
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
然后,依次输入平台名称和 Cookie 内容。
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
看到 Bison 的回复之后,Cookie 就添加成功啦!
 | 
			
		||||
 | 
			
		||||
接下来要关联 Cookie 到一个具体的订阅。
 | 
			
		||||
 | 
			
		||||
> 待添加的图片。
 | 
			
		||||
 | 
			
		||||
输入 `添加关联cookie` 命令,Bison 就会列出当前所有的订阅。
 | 
			
		||||
 | 
			
		||||
我们选择一个订阅,Bison 会列出所有的可以选择的 Cookie。
 | 
			
		||||
 | 
			
		||||
> 待添加的图片。
 | 
			
		||||
 | 
			
		||||
选择需要关联的 Cookie。
 | 
			
		||||
 | 
			
		||||
> 待添加的图片。
 | 
			
		||||
 | 
			
		||||
至此,Bison 便会携带我们的 Cookie 去请求订阅目标啦!
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,25 @@
 | 
			
		||||
import difflib
 | 
			
		||||
import re
 | 
			
		||||
import sys
 | 
			
		||||
import difflib
 | 
			
		||||
 | 
			
		||||
import nonebot
 | 
			
		||||
from nonebot.plugin import require
 | 
			
		||||
from bs4 import BeautifulSoup as bs
 | 
			
		||||
from nonebot.log import logger, default_format
 | 
			
		||||
from nonebot.plugin import require
 | 
			
		||||
from nonebot_plugin_saa import Text, Image, MessageSegmentFactory
 | 
			
		||||
 | 
			
		||||
from .context import ProcessContext as ProcessContext
 | 
			
		||||
from .site import Site as Site
 | 
			
		||||
from ..plugin_config import plugin_config
 | 
			
		||||
from .image import pic_merge as pic_merge
 | 
			
		||||
from .http import http_client as http_client
 | 
			
		||||
from .image import capture_html as capture_html
 | 
			
		||||
from .image import is_pics_mergable as is_pics_mergable
 | 
			
		||||
from .image import pic_merge as pic_merge
 | 
			
		||||
from .image import pic_url_to_image as pic_url_to_image
 | 
			
		||||
from .image import text_to_image as text_to_image
 | 
			
		||||
from .site import ClientManager as ClientManager
 | 
			
		||||
from .site import DefaultClientManager as DefaultClientManager
 | 
			
		||||
from .site import Site as Site
 | 
			
		||||
from .image import text_to_image as text_to_image
 | 
			
		||||
from .site import anonymous_site as anonymous_site
 | 
			
		||||
from ..plugin_config import plugin_config
 | 
			
		||||
from .context import ProcessContext as ProcessContext
 | 
			
		||||
from .image import is_pics_mergable as is_pics_mergable
 | 
			
		||||
from .image import pic_url_to_image as pic_url_to_image
 | 
			
		||||
from .site import DefaultClientManager as DefaultClientManager
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Singleton(type):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user