fix(iyuuautoseed): 馒头不能辅种的问题

This commit is contained in:
景大侠
2025-04-18 12:43:38 +08:00
parent 5dbb1e640e
commit 2ab6a6c5c1
4 changed files with 14 additions and 12 deletions

View File

@@ -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):