diff --git a/plugins/example.py b/plugins/example.py index a0d2d9d..bcf5cfa 100644 --- a/plugins/example.py +++ b/plugins/example.py @@ -161,6 +161,8 @@ def niami(params, authentication): domain = params["domain"] response = requests.get(f"https://api.handshake.niami.io/domain/{domain}") data = response.json()["data"] + if 'rating' not in data: + return {"rating":"No rating found."} rating = str(data["rating"]["score"]) + " (" + data["rating"]["rarity"] + ")" return {"rating":rating} diff --git a/render.py b/render.py index 22151b3..aa00b46 100644 --- a/render.py +++ b/render.py @@ -66,11 +66,6 @@ def transactions(txs): html += f'{action}{address}{hash}{confirmations}{amount} HNS' - - - - - return html