feat: Add stats page
All checks were successful
Build Docker / Build Image (push) Successful in 29s

This commit is contained in:
2023-11-08 12:48:17 +11:00
parent 7172f448d6
commit 29a0a128fb
4 changed files with 148 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ nbcookie = os.getenv('cookie')
cookies = {"namebase-main": nbcookie}
nb_endpoint = "https://www.namebase.io/"
max_price = 4 # Max price to buy a domain at (in HNS)
max_price = 5 # Max price to buy a domain at (in HNS)
def gift(name,email,referer, ip):
@@ -104,6 +104,10 @@ def gift(name,email,referer, ip):
# Add this name to gifts record
gifts[-1]['domain'] = domain
# Save the file
with open(path, 'w') as f:
json.dump(gifts, f)
send_name = requests.post(nb_endpoint + "/api/gift/" + domain.strip(),headers=headers,data=json.dumps(params), cookies=cookies)