mirror of
https://github.com/prusnak/suez.git
synced 2026-08-20 13:28:06 +02:00
18 lines
495 B
Python
18 lines
495 B
Python
import requests
|
|
|
|
|
|
class Score:
|
|
def __init__(self):
|
|
try:
|
|
r = requests.get(
|
|
"https://ln-scores.prod.lightningcluster.com/availability/v3/btc_summary.json",
|
|
headers={"referer": "https://terminal.lightning.engineering/"},
|
|
)
|
|
j = r.json()
|
|
self.scores = j["scored"]
|
|
except:
|
|
self.scores = {}
|
|
|
|
def get(self, key):
|
|
s = self.scores.get(key)
|
|
return s["score"] if s else None
|