Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Aug 24, 2024
1 parent 585d862 commit 5077685
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion YetAnotherPicSearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

load_search_func()

__version__ = "2.0.1.post1"
__version__ = "2.0.1.post2"
__plugin_meta__ = PluginMetadata(
name="YetAnotherPicSearch",
description="基于 NoneBot2 及 PicImageSearch 的另一个 NoneBot 搜图插件",
Expand Down
9 changes: 0 additions & 9 deletions YetAnotherPicSearch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
from typing_extensions import ParamSpec

import arrow
from cachetools import TTLCache
from cookit.loguru import logged_suppress
from httpx import URL, AsyncClient, HTTPStatusError, InvalidURL
from nonebot.adapters.onebot.v11 import Bot
from nonebot.matcher import current_bot, current_event, current_matcher
from nonebot_plugin_alconna.uniseg import Image as ImageSeg, UniMessage, image_fetch
from PicImageSearch.model.ehentai import EHentaiItem, EHentaiResponse
from PIL import Image
from pyquery import PyQuery
from shelved_cache import cachedasyncmethod
from tenacity import TryAgain, retry, stop_after_attempt, stop_after_delay

from .config import config
Expand Down Expand Up @@ -107,12 +104,6 @@ async def handle_img(
return UniMessage.text(f"预览图链接:{url}")


@cachedasyncmethod(lambda _: TTLCache(1, 300))
async def get_bot_friend_list(bot: Bot) -> List[int]:
friend_list = await bot.get_friend_list()
return [i["user_id"] for i in friend_list]


def handle_source(source: str) -> str:
return (
source.replace("www.pixiv.net/en/artworks", "www.pixiv.net/artworks")
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies = [
"tenacity>=9.0.0",
"msgpack>=1.0.8",
"Pillow>=9",
"shelved-cache>=0.3.1",
]
keywords = [
"nonebot",
Expand Down

0 comments on commit 5077685

Please # to comment.