fix timeout
This commit is contained in:
@ -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:
|
||||
|
@ -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 + "/"
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user