diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-09-28 21:02:48 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-09-28 21:02:48 -0700 |
| commit | ca1e1c1d552bd5cc8ce92d3c2c29f0502b269ba0 (patch) | |
| tree | d3e8eefd8a1d37f5c0b38cb4d28bb028c18c03e2 | |
| parent | 014d59aa7f7b833dbe2f4039ddd3a57a8a432066 (diff) | |
force 0.2 sec cooldown between api calls in sdvx pb_merge
| -rw-r--r-- | sdvx/pb_merge/pb_merge.py | 2 |
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"] |
