fix: Stop crash with domain without DNS
This commit is contained in:
parent
fa75ea3570
commit
a5c0ffc4ba
@ -143,15 +143,18 @@ def niami_info(domain: str):
|
|||||||
response = response.json()
|
response = response.json()
|
||||||
if response["data"]["owner_tx_data"] is not None:
|
if response["data"]["owner_tx_data"] is not None:
|
||||||
output = {
|
output = {
|
||||||
"owner": response["data"]["owner_tx_data"]["address"],
|
"owner": response["data"]["owner_tx_data"]["address"]
|
||||||
"dns": response["data"]["dnsData"]
|
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
output = {
|
output = {
|
||||||
"owner": None,
|
"owner": None
|
||||||
"dns": []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if 'dnsData' in response["data"]:
|
||||||
|
output["dns"] = response["data"]["dnsData"]
|
||||||
|
else:
|
||||||
|
output["dns"] = []
|
||||||
|
|
||||||
transactions = requests.get(f"https://api.niami.io/txs/{domain}")
|
transactions = requests.get(f"https://api.niami.io/txs/{domain}")
|
||||||
if transactions.status_code != 200:
|
if transactions.status_code != 200:
|
||||||
return False
|
return False
|
||||||
|
4
main.py
4
main.py
@ -396,9 +396,9 @@ def bid(domain):
|
|||||||
bid = request.args.get("bid")
|
bid = request.args.get("bid")
|
||||||
blind = request.args.get("blind")
|
blind = request.args.get("blind")
|
||||||
|
|
||||||
if bid is "":
|
if bid == "":
|
||||||
bid = 0
|
bid = 0
|
||||||
if blind is "":
|
if blind == "":
|
||||||
blind = 0
|
blind = 0
|
||||||
|
|
||||||
if bid+blind == 0:
|
if bid+blind == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user