fix timeout

This commit is contained in:
jxxghp
2024-03-25 23:01:50 +08:00
parent 3f8453f054
commit 25e0c25bc6
7 changed files with 8 additions and 8 deletions

View File

@ -132,7 +132,7 @@ MoviePilot需要配套下载器和媒体服务器配合使用。
---
- **DOWNLOAD_SUBTITLE** 下载站点字幕,`true`/`false`,默认`true`
---
- **SEARCH_MULTIPLE_NAME** 搜索时是否使用多个名称搜索,`true`/`false`,默认`true`,开启后会使用多个名称进行搜索,搜索结果会更全面,但会增加搜索时间;关闭时只要其中一个名称搜索到结果或全部名称搜索完毕即停止
- **SEARCH_MULTIPLE_NAME** 搜索时是否使用多个名称搜索,`true`/`false`,默认`false`,开启后会使用多个名称进行搜索,搜索结果会更全面,但会增加搜索时间;关闭时只要其中一个名称搜索到结果或全部名称搜索完毕即停止
---
- **MOVIE_RENAME_FORMAT** 电影重命名格式基于jinjia2语法

View File

@ -237,7 +237,7 @@ class Settings(BaseSettings):
# 是否启用DOH解析域名
DOH_ENABLE: bool = True
# 搜索多个名称
SEARCH_MULTIPLE_NAME: bool = True
SEARCH_MULTIPLE_NAME: bool = False
@validator("SUBSCRIBE_RSS_INTERVAL",
"COOKIECLOUD_INTERVAL",

View File

@ -61,7 +61,7 @@ class PlaywrightHelper:
ua: str = None,
proxies: dict = None,
headless: bool = False,
timeout: int = 30) -> str:
timeout: int = 20) -> str:
"""
获取网页源码
:param url: 网页地址

View File

@ -76,7 +76,7 @@ class MTorrentSpider:
ua=self._ua,
proxies=self._proxy,
referer=f"{self._domain}usercp?tab=laboratory",
timeout=30
timeout=15
).post_res(url=f"{self._domain}api/apikey/getKeyList")
if res and res.status_code == 200:
api_keys = res.json().get('data')
@ -125,7 +125,7 @@ class MTorrentSpider:
},
proxies=self._proxy,
referer=f"{self._domain}browse",
timeout=30
timeout=15
).post_res(url=self._searchurl, json=params)
torrents = []
if res and res.status_code == 200:

View File

@ -95,7 +95,7 @@ class TorrentSpider:
self.render = indexer.get('render')
self.domain = indexer.get('domain')
self.result_num = int(indexer.get('result_num') or 100)
self._timeout = int(indexer.get('timeout') or 30)
self._timeout = int(indexer.get('timeout') or 15)
self.page = page
if self.domain and not str(self.domain).endswith("/"):
self.domain = self.domain + "/"

View File

@ -77,7 +77,7 @@ class TNodeSpider:
},
cookies=self._cookie,
proxies=self._proxy,
timeout=30
timeout=15
).post_res(url=self._searchurl, json=params)
torrents = []
if res and res.status_code == 200:

View File

@ -40,7 +40,7 @@ class TorrentLeech:
},
cookies=self._indexer.get('cookie'),
proxies=self._proxy,
timeout=30
timeout=15
).get_res(url)
torrents = []
if res and res.status_code == 200: