From 6b05b5b7bbfce9fd1436af22cc61fecdf3090019 Mon Sep 17 00:00:00 2001 From: AisukaYuki Date: Mon, 8 Jul 2024 16:45:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20iyuu=E8=BE=85=E7=A7=8D=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=A6=92=E5=A4=B4api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/iyuuautoseed/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index 4cdbd49..5d4dd80 100644 --- a/plugins/iyuuautoseed/__init__.py +++ b/plugins/iyuuautoseed/__init__.py @@ -1048,6 +1048,10 @@ class IYUUAutoSeed(_PluginBase): if not apikey: logger.error("m-team站点的apikey未配置") return None + + # 获取馒头 URL 并替换为api + api_url = re.sub(r'//[^/]+\.m-team', '//api.m-team', site.get('url')) + res = RequestUtils( headers={ 'Content-Type': 'application/json', @@ -1055,7 +1059,7 @@ class IYUUAutoSeed(_PluginBase): 'Accept': 'application/json, text/plain, */*', 'x-api-key': apikey } - ).post_res(f"{site.get('url')}api/torrent/genDlToken", params={ + ).post_res(f"{api_url}api/torrent/genDlToken", params={ 'id': tid }) if not res: