import requests import time from tqdm import tqdm url = "http://ir-blaster.n39.eu/button/multisyncx401s_taste_%s/press" for i in tqdm(range(0000, 10000)): num_str = f"{i:04d}" print(f"Sending: {num_str}") for digit in num_str: requests.post(url % digit) time.sleep(0.35) time.sleep(0.35)