fix #4741 FlareSolverr使用站点设置的超时时间,未设置时默认60秒

close #4742
close https://github.com/jxxghp/MoviePilot-Frontend/pull/378
This commit is contained in:
jxxghp
2025-08-12 08:04:29 +08:00
parent c7ba274877
commit fdbfae953d
5 changed files with 25 additions and 24 deletions

View File

@@ -429,13 +429,14 @@ class RssHelper:
return ret_array
def get_rss_link(self, url: str, cookie: str, ua: str, proxy: bool = False) -> Tuple[str, str]:
def get_rss_link(self, url: str, cookie: str, ua: str, proxy: bool = False, timeout: int = None) -> Tuple[str, str]:
"""
获取站点rss地址
:param url: 站点地址
:param cookie: 站点cookie
:param ua: 站点ua
:param proxy: 是否使用代理
:param timeout: 请求超时时间
:return: rss地址、错误信息
"""
try:
@@ -453,12 +454,13 @@ class RssHelper:
url=rss_url,
cookies=cookie,
ua=ua,
proxies=settings.PROXY if proxy else None
proxies=settings.PROXY_SERVER if proxy else None,
timeout=timeout or 60
)
else:
res = RequestUtils(
cookies=cookie,
timeout=60,
timeout=timeout or 30,
ua=ua,
proxies=settings.PROXY if proxy else None
).post_res(url=rss_url, data=rss_params)