diff --git a/package.json b/package.json index ac58481..28f2ca0 100644 --- a/package.json +++ b/package.json @@ -278,6 +278,7 @@ "author": "jxxghp", "level": 2, "history": { + "v1.9.2": "适配馒头使用API下载种子", "v1.9.1": "支持自定义辅种的种子分类", "v1.9": "支持自定义辅种后标签,支持将站点名作为标签", "v1.8.2": "qBittorrent 支持跳过校验", diff --git a/plugins/iyuuautoseed/__init__.py b/plugins/iyuuautoseed/__init__.py index 5fd8f48..b259390 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.1" + plugin_version = "1.9.2" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -1048,6 +1048,12 @@ class IYUUAutoSeed(_PluginBase): if not apikey: logger.error("m-team站点的apikey未配置") return None + + """ + 将mteam种子下载链接域名替换为使用API + """ + api_url = re.sub(r'//[^/]+\.m-team', '//api.m-team', site.get('url')) + res = RequestUtils( headers={ 'Content-Type': 'application/json', @@ -1055,7 +1061,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: