Skip to content

Commit

Permalink
Added getSkins requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
masterking32 committed Aug 11, 2024
1 parent 1d81112 commit ee0f949
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,27 @@ def IPRequest(self):
# Send GET request
return self.HttpRequest(url, headers, "GET", 200)

def GetSkins(self):
url = "https://api.hamsterkombatgame.io/clicker/get-skin"
headers = {
"Access-Control-Request-Headers": "authorization,content-type",
"Access-Control-Request-Method": "POST",
}

# Send OPTIONS request
self.HttpRequest(url, headers, "OPTIONS", 200)

headers = {
"Accept": "application/json",
"Authorization": self.Authorization,
"Content-Type": "application/json",
}

payload = json.dumps({})

# Send POST request
return self.HttpRequest(url, headers, "POST", 200, payload)

def MeTelegramRequest(self):
url = "https://api.hamsterkombatgame.io/auth/me-telegram"
headers = {
Expand Down Expand Up @@ -1183,6 +1204,14 @@ def Start(self):
)
return

log.info(f"[{self.account_name}] Getting account skins...")
SkinsData = self.GetSkins()
if SkinsData is None:
log.error(f"[{self.account_name}] Failed to get skins.")
self.SendTelegramLog(
f"[{self.account_name}] Failed to get skins.", "other_errors"
)

log.info(
f"[{self.account_name}] IP: {ipResponse['ip']} Company: {ipResponse['asn_org']} Country: {ipResponse['country_code']}"
)
Expand Down

0 comments on commit ee0f949

Please sign in to comment.