-
Notifications
You must be signed in to change notification settings - Fork 0
/
shoppy.py
31 lines (28 loc) · 860 Bytes
/
shoppy.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
27
28
29
30
31
from json import JSONDecodeError
from urllib import request
import requests
# import aiohttp
import random
import string
import time
def get_random_string(length):
# choose from all lowercase letter
letters = string.ascii_lowercase
result_str = ''.join(random.choice(letters) for i in range(length))
return result_str
product = input("input product code eg: [(https://shoppy.gg/product/0sv149x) (0sv149x is your product code)] ")
while True:
data = {
"email": f"{get_random_string(10)}@gmail.com",
"fields": [],
"gateway": "BTC",
"product": product,
"quantity": 1
}
data = requests.put('https://shoppy.gg/api/v1/public/order/store', json=data)
try:
json = data.json()
except requests.exceptions.JSONDecodeError:
print('sleep')
time.sleep(5)
print(json)