Skip to content

Commit

Permalink
v2.6.13 (#385)
Browse files Browse the repository at this point in the history
* fix(cookies): 修正 cookies 相关逻辑

* fix(apscheduler): 修正 apscheduler 相关逻辑

* fix(handle_date): 修正日期处理相关逻辑

* chore: 优化逻辑和样式

* fix(deps): 适配 pikpakapi

* chore(release): v2.6.13

* fix(deps): 依赖升级

* fix(change_dy): 修正只修改 `rm_list` 时的处理逻辑

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Quan <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2023
1 parent 5e3fde8 commit 9d753f1
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.2.0
- name: Set up Python
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v4.4.0
with:
python-version: '3.8'
- name: Install dependencies
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.5.1
uses: pypa/gh-action-pypi-publish@v1.6.4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ELF_RSS"
version = "2.6.12"
version = "2.6.13"
description = "QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub"
authors = ["Quan666 <[email protected]>"]
license = "GPL-3.0-only"
Expand All @@ -14,31 +14,31 @@ keywords = ["nonebot", "nonebot2", "rss" ,"elf" ,"rsshub"]

[tool.poetry.dependencies]
python = "^3.8.3"
aiohttp = { extras = ["speedups"], version = "^3.8.3" }
aiohttp = {extras = ["speedups"], version = "^3.8.3"}
arrow = "^1.2.3"
bbcode = "^1.1.0"
cachetools = "^5.2.0"
emoji = "^2.1.0"
emoji = "^2.2.0"
feedparser = "^6.0.10"
deep-translator = "^1.9.0"
deep-translator = "^1.9.1"
ImageHash = "^4.3.1"
magneturi = "^1.3"
nonebot-adapter-onebot = "^2.1.5"
nonebot-adapter-onebot = "^2.2.0"
nonebot-plugin-apscheduler = "^0.2.0"
nonebot-plugin-guild-patch = "^0.2.1"
nonebot2 = "^2.0.0-rc.1"
pikpakapi = "^0.0.7"
Pillow = "^9.2.0"
nonebot2 = "^2.0.0-rc.2"
pikpakapi = "^0.1.1"
Pillow = "^9.3.0"
pydantic = "^1.10.2"
pyquery = "^1.4.3"
python-qbittorrent = "^0.4.3"
tenacity = "^8.1.0"
tinydb = "^4.7.0"
typing-extensions = "^4.4.0"
yarl = "^1.8.1"
yarl = "^1.8.2"

[tool.poetry.dev-dependencies]
nb-cli = "^0.6.7"
nb-cli = "^0.6.8"

[tool.mypy]
python_version = "3.8"
Expand Down
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ aiohttp[speedups]~=3.8.3
arrow~=1.2.3
bbcode~=1.1.0
cachetools~=5.2.0
emoji~=2.1.0
emoji~=2.2.0
feedparser~=6.0.10
deep-translator~=1.9.0
deep-translator~=1.9.1
ImageHash~=4.3.1
magneturi~=1.3
nb-cli~=0.6.7
nonebot-adapter-onebot==2.1.5
nb-cli~=0.6.8
nonebot-adapter-onebot~=2.2.0
nonebot-plugin-apscheduler~=0.2.0
nonebot-plugin-guild-patch~=0.2.1
nonebot2==2.0.0rc1
pikpakapi~=0.0.7
Pillow~=9.2.0
nonebot2~=2.0.0rc2
pikpakapi~=0.1.1
Pillow~=9.3.0
pydantic~=1.10.2
pyquery~=1.4.3
python-qbittorrent~=0.4.3
tenacity==8.1.0
tenacity~=8.1.0
tinydb~=4.7.0
typing-extensions==4.4.0
yarl~=1.8.1
typing-extensions~=4.4.0
yarl~=1.8.2
5 changes: 3 additions & 2 deletions src/plugins/ELF_RSS2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
require("nonebot_plugin_apscheduler")
from nonebot_plugin_apscheduler import scheduler # noqa

VERSION = "2.6.12"
VERSION = "2.6.13"

__plugin_meta__ = PluginMetadata(
name="ELF_RSS",
description="QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub",
Expand All @@ -23,7 +24,7 @@
)


async def check_first_connect(_: LifecycleMetaEvent) -> bool:
def check_first_connect(_: LifecycleMetaEvent) -> bool:
return True


Expand Down
2 changes: 1 addition & 1 deletion src/plugins/ELF_RSS2/command/change_dy.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def handle_rm_list(
if rm_list_exist:
rm_list_str = rm_list_exist[0].lstrip().replace("rm_list=", "")
rm_list = [i.strip("'") for i in rm_list_str.split("','")]
change_info = change_info.replace(rm_list_exist[0], "")
change_info = change_info.replace(rm_list_exist[0], "").strip()

if rm_list:
for rss in rss_list:
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/ELF_RSS2/parsing/handle_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ async def resize_gif(url: str, resize_ratio: int = 2) -> Optional[bytes]:
)
d = Pq(await resp.text())
next_url = d("form").attr("action")
file = d("form > input[type=hidden]:nth-child(1)").attr("value")
_file = d("form > input[type=hidden]:nth-child(1)").attr("value")
token = d("form > input[type=hidden]:nth-child(2)").attr("value")
old_width = d("form > input[type=hidden]:nth-child(3)").attr("value")
old_height = d("form > input[type=hidden]:nth-child(4)").attr("value")
data = {
"file": file,
"file": _file,
"token": token,
"old_width": old_width,
"old_height": old_height,
Expand Down Expand Up @@ -62,7 +62,7 @@ async def get_preview_gif_from_video(url: str) -> str:
seconds = int(video_length.split(":")[2])
video_length_median = (hours * 60 * 60 + minutes * 60 + seconds) // 2
next_url = d("form").attr("action")
file = d("form > input[type=hidden]:nth-child(1)").attr("value")
_file = d("form > input[type=hidden]:nth-child(1)").attr("value")
token = d("form > input[type=hidden]:nth-child(2)").attr("value")
default_end = d("#end").attr("value")
if float(default_end) >= 4:
Expand All @@ -72,7 +72,7 @@ async def get_preview_gif_from_video(url: str) -> str:
start = 0
end = default_end
data = {
"file": file,
"file": _file,
"token": token,
"start": start,
"end": end,
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/ELF_RSS2/parsing/parsing_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def append_before_handler(
装饰一个方法,作为将其一个前置处理器
参数:
rex: 用于正则匹配目标订阅地址,匹配成功后执行器将适用
proirity: 执行器优先级,自定义执行器会覆盖掉相同优先级的默认执行器
priority: 执行器优先级,自定义执行器会覆盖掉相同优先级的默认执行器
block: 是否要阻断后续执行器进行
"""

Expand All @@ -107,7 +107,7 @@ def append_after_handler(
装饰一个方法,作为将其一个后置处理器
参数:
rex: 用于正则匹配目标订阅地址,匹配成功后执行器将适用
proirity: 执行器优先级,自定义执行器会覆盖掉相同优先级的默认执行器
priority: 执行器优先级,自定义执行器会覆盖掉相同优先级的默认执行器
block: 是否要阻断后续执行器进行
"""

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/ELF_RSS2/permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class GuildSuperUser:
async def __call__(self, bot: Bot, event: GuildMessageEvent) -> bool:
def __call__(self, bot: Bot, event: GuildMessageEvent) -> bool:
return (
bot.config.guild_superusers is not None
and event.get_type() == "message"
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/ELF_RSS2/pikpak_offline.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Any, Dict, List, Optional

from nonebot.log import logger
from pikpakapi.async_api import PikPakApiAsync
from pikpakapi import PikPakApi
from pikpakapi.PikpakException import PikpakAccessTokenExpireException, PikpakException

from .config import config

pikpak_client = PikPakApiAsync(
pikpak_client = PikPakApi(
username=config.pikpak_username,
password=config.pikpak_password,
)
Expand Down

0 comments on commit 9d753f1

Please sign in to comment.