From 2ab6a6c5c17041b54c0fe8d9aef33fdd370f0c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=AF=E5=A4=A7=E4=BE=A0?= Date: Fri, 18 Apr 2025 12:43:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(iyuuautoseed):=20=E9=A6=92=E5=A4=B4?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=BE=85=E7=A7=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- package.v2.json | 3 ++- plugins.v2/iyuuautoseed/__init__.py | 10 +++++----- plugins/iyuuautoseed/__init__.py | 10 +++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index ec355be..4a23aaf 100644 --- a/package.json +++ b/package.json @@ -312,11 +312,12 @@ "name": "IYUU自动辅种", "description": "基于IYUU官方Api实现自动辅种。", "labels": "做种,IYUU", - "version": "1.9.10", + "version": "1.9.11", "icon": "IYUU.png", "author": "jxxghp", "level": 2, "history": { + "v1.9.11": "修复馒头不能辅种的问题", "v1.9.10": "Revert 辅种结束后,一起开始所有辅种后暂停的种子(排除了出错的种子)", "v1.9.9": "修复qb辅种结束后自动开始暂停的种子", "v1.9.8": "辅种结束后,一起开始所有辅种后暂停的种子(排除了出错的种子)", diff --git a/package.v2.json b/package.v2.json index 0a0b902..d7214cf 100644 --- a/package.v2.json +++ b/package.v2.json @@ -224,11 +224,12 @@ "name": "IYUU自动辅种", "description": "基于IYUU官方Api实现自动辅种。", "labels": "做种,IYUU", - "version": "2.13", + "version": "2.14", "icon": "IYUU.png", "author": "jxxghp,CKun", "level": 2, "history": { + "v2.14": "修复馒头不能辅种的问题", "v2.13": "开启跳过校验后需手动开启自动开始", "v2.12": "增加qb下载器分类复用配置", "v2.11": "修复qb跳过校验不自动开始的问题", diff --git a/plugins.v2/iyuuautoseed/__init__.py b/plugins.v2/iyuuautoseed/__init__.py index d36da84..a9d9766 100644 --- a/plugins.v2/iyuuautoseed/__init__.py +++ b/plugins.v2/iyuuautoseed/__init__.py @@ -33,7 +33,7 @@ class IYUUAutoSeed(_PluginBase): # 插件图标 plugin_icon = "IYUU.png" # 插件版本 - plugin_version = "2.13" + plugin_version = "2.14" # 插件作者 plugin_author = "jxxghp,CKun" # 作者主页 @@ -1241,11 +1241,11 @@ class IYUUAutoSeed(_PluginBase): 将mteam种子下载链接域名替换为使用API """ api_url = re.sub(r'//[^/]+\.m-team', '//api.m-team', site.get('url')) - + ua = site.get("ua") or settings.USER_AGENT res = RequestUtils( headers={ - 'Content-Type': 'application/json', - 'User-Agent': f'{site.get("ua")}', + 'Content-Type': 'application/x-www-form-urlencoded', + 'User-Agent': f'{ua}', 'Accept': 'application/json, text/plain, */*', 'x-api-key': apikey } @@ -1339,7 +1339,7 @@ class IYUUAutoSeed(_PluginBase): logger.info(f"正在获取种子下载链接:{page_url} ...") res = RequestUtils( cookies=site.get("cookie"), - ua=site.get("ua"), + ua=site.get("ua") or settings.USER_AGENT, proxies=settings.PROXY if site.get("proxy") else None ).get_res(url=page_url) if res is not None and res.status_code in (200, 500): diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index 0d47a5d..0086e4d 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -34,7 +34,7 @@ class IYUUAutoSeed(_PluginBase): # 插件图标 plugin_icon = "IYUU.png" # 插件版本 - plugin_version = "1.9.10" + plugin_version = "1.9.11" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -1064,11 +1064,11 @@ class IYUUAutoSeed(_PluginBase): 将mteam种子下载链接域名替换为使用API """ api_url = re.sub(r'//[^/]+\.m-team', '//api.m-team', site.get('url')) - + ua = site.get("ua") or settings.USER_AGENT res = RequestUtils( headers={ - 'Content-Type': 'application/json', - 'User-Agent': f'{site.get("ua")}', + 'Content-Type': 'application/x-www-form-urlencoded', + 'User-Agent': f'{ua}', 'Accept': 'application/json, text/plain, */*', 'x-api-key': apikey } @@ -1162,7 +1162,7 @@ class IYUUAutoSeed(_PluginBase): logger.info(f"正在获取种子下载链接:{page_url} ...") res = RequestUtils( cookies=site.get("cookie"), - ua=site.get("ua"), + ua=site.get("ua") or settings.USER_AGENT, proxies=settings.PROXY if site.get("proxy") else None ).get_res(url=page_url) if res is not None and res.status_code in (200, 500):