import os import requests import shutil # Masaüstü yolu desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop') # İndirilecek resmin URL'si image_url = 'https://example.com/image.jpg' # Resmi indirme fonksiyonu def download_image(url, save_path): response = requests.get(url, stream=True) if response.status_code == 200: with open(save_path, 'wb') as f: for chunk in response.iter_content(1024): f.write(chunk) else: print(f"Resim indirme başarısız oldu. HTTP Status Kodu: {response.status_code}") # İlk resmi indirme ve kaydetme original_image_path = os.path.join(desktop, 'troll_image.jpg') download_image(image_url, original_image_path) # Resmi çoğaltma for i in range(1, 50): new_image_path = os.path.join(desktop, f'troll_image_{i}.jpg') shutil.copy(original_image_path, new_image_path) print("Resim başarıyla indirildi ve çoğaltıldı.")