[videogames] Dont die if arcadeitalia is down
All checks were successful
build & deploy / test (push) Successful in 1m51s
build & deploy / deploy (push) Successful in 26s

This commit is contained in:
2026-03-22 14:08:12 -04:00
parent 466d8d26c6
commit 44eb193b33

View File

@ -28,7 +28,10 @@ def scrape_game_name_from_adb(name: str) -> str:
title = ""
headers = {"User-Agent": "Vrobbler 0.11.12"}
url = MAME_LOOKUP_URL.format(query=name)
resp = requests.get(url, headers=headers)
try:
resp = requests.get(url, headers=headers)
except ConnectionError:
raise GameNotFound(f"Lookup failed with code {resp.status_code}")
if not resp.ok:
raise GameNotFound(f"Lookup failed with code {resp.status_code}")