|
import subprocess |
|
|
|
|
|
proxies = [ |
|
|
|
|
|
"8.219.97.248:80" |
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
url = "http://zoom.lk" |
|
|
|
|
|
for proxy in proxies: |
|
command = ['wget','--timeout=3', '-e', 'use_proxy=yes', '-e', f'http_proxy=http://{proxy}', url] |
|
|
|
|
|
print(f"Running command: {' '.join(command)}") |
|
|
|
|
|
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()) |
|
|
|
|
|
stderr_output = process.stderr.read() |
|
if stderr_output: |
|
print(stderr_output.decode().strip()) |
|
|