fix timeout
This commit is contained in:
@ -132,7 +132,7 @@ MoviePilot需要配套下载器和媒体服务器配合使用。
|
|||||||
---
|
---
|
||||||
- **DOWNLOAD_SUBTITLE:** 下载站点字幕,`true`/`false`,默认`true`
|
- **DOWNLOAD_SUBTITLE:** 下载站点字幕,`true`/`false`,默认`true`
|
||||||
---
|
---
|
||||||
- **SEARCH_MULTIPLE_NAME:** 搜索时是否使用多个名称搜索,`true`/`false`,默认`true`,开启后会使用多个名称进行搜索,搜索结果会更全面,但会增加搜索时间;关闭时只要其中一个名称搜索到结果或全部名称搜索完毕即停止
|
- **SEARCH_MULTIPLE_NAME:** 搜索时是否使用多个名称搜索,`true`/`false`,默认`false`,开启后会使用多个名称进行搜索,搜索结果会更全面,但会增加搜索时间;关闭时只要其中一个名称搜索到结果或全部名称搜索完毕即停止
|
||||||
---
|
---
|
||||||
- **MOVIE_RENAME_FORMAT:** 电影重命名格式,基于jinjia2语法
|
- **MOVIE_RENAME_FORMAT:** 电影重命名格式,基于jinjia2语法
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ class Settings(BaseSettings):
|
|||||||
# 是否启用DOH解析域名
|
# 是否启用DOH解析域名
|
||||||
DOH_ENABLE: bool = True
|
DOH_ENABLE: bool = True
|
||||||
# 搜索多个名称
|
# 搜索多个名称
|
||||||
SEARCH_MULTIPLE_NAME: bool = True
|
SEARCH_MULTIPLE_NAME: bool = False
|
||||||
|
|
||||||
@validator("SUBSCRIBE_RSS_INTERVAL",
|
@validator("SUBSCRIBE_RSS_INTERVAL",
|
||||||
"COOKIECLOUD_INTERVAL",
|
"COOKIECLOUD_INTERVAL",
|
||||||
|
@ -61,7 +61,7 @@ class PlaywrightHelper:
|
|||||||
ua: str = None,
|
ua: str = None,
|
||||||
proxies: dict = None,
|
proxies: dict = None,
|
||||||
headless: bool = False,
|
headless: bool = False,
|
||||||
timeout: int = 30) -> str:
|
timeout: int = 20) -> str:
|
||||||
"""
|
"""
|
||||||
获取网页源码
|
获取网页源码
|
||||||
:param url: 网页地址
|
:param url: 网页地址
|
||||||
|
@ -76,7 +76,7 @@ class MTorrentSpider:
|
|||||||
ua=self._ua,
|
ua=self._ua,
|
||||||
proxies=self._proxy,
|
proxies=self._proxy,
|
||||||
referer=f"{self._domain}usercp?tab=laboratory",
|
referer=f"{self._domain}usercp?tab=laboratory",
|
||||||
timeout=30
|
timeout=15
|
||||||
).post_res(url=f"{self._domain}api/apikey/getKeyList")
|
).post_res(url=f"{self._domain}api/apikey/getKeyList")
|
||||||
if res and res.status_code == 200:
|
if res and res.status_code == 200:
|
||||||
api_keys = res.json().get('data')
|
api_keys = res.json().get('data')
|
||||||
@ -125,7 +125,7 @@ class MTorrentSpider:
|
|||||||
},
|
},
|
||||||
proxies=self._proxy,
|
proxies=self._proxy,
|
||||||
referer=f"{self._domain}browse",
|
referer=f"{self._domain}browse",
|
||||||
timeout=30
|
timeout=15
|
||||||
).post_res(url=self._searchurl, json=params)
|
).post_res(url=self._searchurl, json=params)
|
||||||
torrents = []
|
torrents = []
|
||||||
if res and res.status_code == 200:
|
if res and res.status_code == 200:
|
||||||
|
@ -95,7 +95,7 @@ class TorrentSpider:
|
|||||||
self.render = indexer.get('render')
|
self.render = indexer.get('render')
|
||||||
self.domain = indexer.get('domain')
|
self.domain = indexer.get('domain')
|
||||||
self.result_num = int(indexer.get('result_num') or 100)
|
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
|
self.page = page
|
||||||
if self.domain and not str(self.domain).endswith("/"):
|
if self.domain and not str(self.domain).endswith("/"):
|
||||||
self.domain = self.domain + "/"
|
self.domain = self.domain + "/"
|
||||||
|
@ -77,7 +77,7 @@ class TNodeSpider:
|
|||||||
},
|
},
|
||||||
cookies=self._cookie,
|
cookies=self._cookie,
|
||||||
proxies=self._proxy,
|
proxies=self._proxy,
|
||||||
timeout=30
|
timeout=15
|
||||||
).post_res(url=self._searchurl, json=params)
|
).post_res(url=self._searchurl, json=params)
|
||||||
torrents = []
|
torrents = []
|
||||||
if res and res.status_code == 200:
|
if res and res.status_code == 200:
|
||||||
|
@ -40,7 +40,7 @@ class TorrentLeech:
|
|||||||
},
|
},
|
||||||
cookies=self._indexer.get('cookie'),
|
cookies=self._indexer.get('cookie'),
|
||||||
proxies=self._proxy,
|
proxies=self._proxy,
|
||||||
timeout=30
|
timeout=15
|
||||||
).get_res(url)
|
).get_res(url)
|
||||||
torrents = []
|
torrents = []
|
||||||
if res and res.status_code == 200:
|
if res and res.status_code == 200:
|
||||||
|
Reference in New Issue
Block a user