Skip to content

Commit 177a951

Browse files
committed
Timeout parameters adjusted due to timeouts occurring too rapidly.
1 parent e9d0072 commit 177a951

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/web.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def get_leagues() -> tuple:
121121
"""
122122
try:
123123
leagues = requests.get(
124-
url="https://www.pathofexile.com/api/trade/data/leagues", timeout=1
124+
url="https://www.pathofexile.com/api/trade/data/leagues", timeout=2
125125
).json()
126126
return tuple(x["id"] for x in leagues["result"])
127127
except Exception:
@@ -294,7 +294,7 @@ def get_ninja_bases(league: str):
294294
global ninja_bases
295295
if not ninja_bases:
296296
try:
297-
requests.post(b"https://poe.ninja/", timeout=0.5)
297+
requests.post(b"https://poe.ninja/", timeout=2)
298298
except Exception:
299299
logging.info("poe.ninja is not available.")
300300
return None
@@ -421,7 +421,7 @@ def get_poe_prices_info(item):
421421
:param item: The item whose info we will query
422422
"""
423423
try:
424-
results = requests.post(b"http://poeprices.info", timeout=0.5)
424+
results = requests.post(b"http://poeprices.info", timeout=2)
425425
except Exception:
426426
logging.info("poeprices.info is not available.")
427427
return {}

0 commit comments

Comments
 (0)