import subprocess # List of proxies proxies = [ "130.61.171.71", "38.54.71.67" "8.219.97.248", # Add more proxies as needed ] # URL to download url = "http://zoom.lk" # Generate and execute wget commands for proxy in proxies: command = ['wget','--timeout=3', '-e', 'use_proxy=yes', '-e', f'http_proxy=http://{proxy}:80', url] # Print the command print(f"Running command: {' '.join(command)}") # Execute the command and capture output live process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) while True: output = process.stdout.readline() if output == b'' and process.poll() is not None: break if output: print(output.decode().strip()) # Capture any error messages stderr_output = process.stderr.read() if stderr_output: print(stderr_output.decode().strip())