File size: 921 Bytes
472154b
 
 
 
cfe6620
1a01412
 
 
472154b
 
 
 
 
 
 
 
 
 
60df9f9
472154b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import subprocess

# List of proxies
proxies = [
   # "130.61.171.71",
  #  "117.54.114.33",
    "8.219.97.248:80"
  
   

    # 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}', 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())