-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
26 lines (22 loc) · 1.11 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import requests, json
from time import sleep
url = "https://api.discord.gx.games/v1/direct-fulfillment"
payload = {"partnerUserId": "ed5941bb5627375140a009235ea9779f86707a041cdab12e0cb2affb4addba96"}
headers = {
"authority": "api.discord.gx.games",
"content-type": "application/json",
"origin": "https://www.opera.com",
"referer": "https://www.opera.com/",
"sec-ch-ua": '"Opera GX";v="105", "Chromium";v="119", "Not?A_Brand";v="24"',
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/105.0.0.0"
}
while True:
response = requests.request("POST", url, json=payload, headers=headers)
# create a new txt file in the same directory if not exist and adds the links
if response.status_code == 200:
with open("output.txt", "a") as f:
f.write(f"https://discord.com/billing/partner-promotions/1180231712274387115/{json.loads(response.text.encode('utf8').decode('utf8')).get('token')}" + "\n")
elif response.status_code == 429:
break
else:
print("Request failed: ", response.text)