import requests
import time
# Proxy sunucularının bulunduğu txt dosyasının adı ve yolu
proxy_file_path = "proxy_list.txt"
# buraya kendi url'ni yaz
url = "https://Kisalink.com"
# Proxy listesini oku
with open(proxy_file_path, "r") as proxy_file:
proxy_list = proxy_file.readlines()
# Proxy listesini temizle (boşlukları ve yeni satırları kaldır)
proxy_list = [proxy.strip() for proxy in proxy_list]
for proxy_address in proxy_list:
try:
# Proxy sunucusu ayarları
proxy = {
"http": proxy_address,
"https": proxy_address,
}
# Proxy ile isteği gönderin
response = requests.get(url, proxies=proxy, timeout=5)
if response.status_code == 200 or response.status_code == 302:
print(f"{proxy_address} ile başarılı")
else:
print(f"{proxy_address} ile başarısız")
except requests.exceptions.RequestException as e:
print(f"{proxy_address} ile bağlantı hatası:", e)
# Belirli bir süre bekleme
time.sleep(0.5)