Skip to content

Commit

Permalink
Update script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fm-sys authored Jul 27, 2024
1 parent 390f7fe commit c56be73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion translation-validation-bot/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ def print2cache(str):
counter = counter + 1
try:
translation = translator.translate(match.group(2).replace("\\n", " \\n "))
print("API call #" + str(counter) + " ok")
success = True
except:
print("API call #" + str(counter) + " blocked, wait some seconds and try again...")
time.sleep(10)
time.sleep(60)
print2cache(f"{match.group(1)}|{translation.origin} ({translation.src})|{translation.text} ({translation.dest})")
elif line.startswith("+++"):
print2cache("\n\n" + line + "\n")
Expand Down

0 comments on commit c56be73

Please sign in to comment.