Skip to content

Commit 2d692bb

Browse files
committed
Removed manual sleeping to avoid API rate limits
1 parent 39b91ee commit 2d692bb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

redeem_code.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@
4646
(result for result in results if result["code"] == args.code), None)
4747

4848
if found_item is None:
49-
print("New code:" + args.code + " adding to results file and processing.")
49+
print("New code: " + args.code + " adding to results file and processing.")
5050
new_item = {"code": args.code, "status": {}}
5151
results.append(new_item)
5252
result = new_item
5353
else:
5454
result = found_item
5555

5656
# Some variables that are used to tracking progress
57-
session_counter = 1
5857
counter_successfully_claimed = 0
5958
counter_already_claimed = 0
6059
counter_error = 0
@@ -138,12 +137,6 @@
138137
print("\nError occurred: " + str(redeem_response))
139138
counter_error += 1
140139

141-
# Refresh the webpage every 5 players to avoid getting soft-banned at some point
142-
if session_counter % 5 == 0:
143-
time.sleep(5)
144-
145-
session_counter += 1
146-
147140
with open(args.results_file, 'w', encoding="utf-8") as fp:
148141
json.dump(results, fp)
149142

0 commit comments

Comments
 (0)