Skip to content

Commit db51f03

Browse files
committed
Use new explorer endpoint and send token
1 parent b636136 commit db51f03

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,18 @@ async def get_opening_explorer(
249249
self, username: str, fen: str, variant: Variant, color: str, modes: str | None, speeds: str | None, timeout: int
250250
) -> dict[str, Any] | None:
251251
if username == "masters":
252-
url = "https://explorer.lichess.ovh/masters"
252+
url = "https://explorer.lichess.org/masters"
253253
params = {"fen": fen, "topGames": 0}
254254
else:
255-
url = "https://explorer.lichess.ovh/player"
255+
url = "https://explorer.lichess.org/player"
256256
params = {"player": username, "variant": variant, "fen": fen, "color": color, "recentGames": 0}
257257
if speeds:
258258
params["speeds"] = speeds
259259
if modes:
260260
params["modes"] = modes
261261

262262
try:
263-
async with self.external_session.get(
263+
async with self.lichess_session.get(
264264
url, params=params, timeout=aiohttp.ClientTimeout(total=timeout)
265265
) as response:
266266
response.raise_for_status()

0 commit comments

Comments
 (0)