aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-09-28 21:02:48 -0700
committerPinapelz <yukais@pinapelz.com>2025-09-28 21:02:48 -0700
commitca1e1c1d552bd5cc8ce92d3c2c29f0502b269ba0 (patch)
treed3e8eefd8a1d37f5c0b38cb4d28bb028c18c03e2
parent014d59aa7f7b833dbe2f4039ddd3a57a8a432066 (diff)
force 0.2 sec cooldown between api calls in sdvx pb_merge
-rw-r--r--sdvx/pb_merge/pb_merge.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sdvx/pb_merge/pb_merge.py b/sdvx/pb_merge/pb_merge.py
index cdeacbf..bd07a18 100644
--- a/sdvx/pb_merge/pb_merge.py
+++ b/sdvx/pb_merge/pb_merge.py
@@ -2,6 +2,7 @@ import argparse
import csv
import os
import requests
+import time
DIFFICULTY_MAPPING = {
"NOVICE": "NOV",
@@ -40,6 +41,7 @@ def merge_csv(input_file: str, tachi_url: str, username: str, output_file: str):
print(f"[{current_row}/{total_rows}] Searching for score: {title} at difficulty {diff}")
try:
response = requests.get(api_url)
+ time.sleep(0.2)
response.raise_for_status()
data = response.json()
charts = data["body"]["charts"]
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage