fix: Stop crash with domain without DNS

This commit is contained in:
Nathan Woodburn 2024-01-03 02:05:48 +11:00
parent fa75ea3570
commit a5c0ffc4ba
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 9 additions and 6 deletions

View File

@ -143,15 +143,18 @@ def niami_info(domain: str):
response = response.json()
if response["data"]["owner_tx_data"] is not None:
output = {
"owner": response["data"]["owner_tx_data"]["address"],
"dns": response["data"]["dnsData"]
"owner": response["data"]["owner_tx_data"]["address"]
}
else:
output = {
"owner": None,
"dns": []
"owner": None
}
if 'dnsData' in response["data"]:
output["dns"] = response["data"]["dnsData"]
else:
output["dns"] = []
transactions = requests.get(f"https://api.niami.io/txs/{domain}")
if transactions.status_code != 200:
return False

View File

@ -396,9 +396,9 @@ def bid(domain):
bid = request.args.get("bid")
blind = request.args.get("blind")
if bid is "":
if bid == "":
bid = 0
if blind is "":
if blind == "":
blind = 0
if bid+blind == 0: