mirror of
https://github.com/searxng/searxng.git
synced 2026-04-30 04:30:39 -04:00
[fix] unhandled Exceptions in radio_browser.py
Closes: https://github.com/searxng/searxng/issues/5439 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
d1f9409afc
commit
a9f3baefe6
@ -72,7 +72,11 @@ def server_list() -> list[str]:
|
||||
ips = socket.getaddrinfo("all.api.radio-browser.info", 80, 0, 0, socket.IPPROTO_TCP)
|
||||
for ip_tuple in ips:
|
||||
_ip: str = ip_tuple[4][0] # type: ignore
|
||||
url = socket.gethostbyaddr(_ip)[0]
|
||||
try:
|
||||
url = socket.gethostbyaddr(_ip)[0]
|
||||
except socket.herror:
|
||||
# https://github.com/searxng/searxng/issues/5439
|
||||
continue
|
||||
srv = "https://" + url
|
||||
if srv not in servers:
|
||||
servers.append(srv)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user