Chrome uzantısı veya basit bir JavaScript betiği kullanabilirsin



Aşağıdaki Kodu Yapıştır


function playVideosSequentially() {
let videos = document.querySelectorAll('video');
let current = 0;

function playNext() {
if (current >= videos.length) {
console.log("Tüm videolar oynatıldı.");
return;
}

let video = videos[current];
video.play();
console.log(`Video ${current + 1} başladı`);

video.onended = () => {
console.log(`Video ${current + 1} bitti`);
current++;
// Eğer sonraki videoya geçmek için sayfa değiştirmen gerekiyorsa aşağıyı özelleştir
playNext();
};
}

playNext();
}

playVideosSequentially();





🔸 Bu kod sayfadaki tüm <video> elementlerini sırayla oynatır.
🔸 Ancak her video ayrı bir sayfadaysa (muhtemelen öyle), her video için bir sayfa yenilenmesi gerekiyorsa, bu yöntem işe yaramaz.


Otomasyon İçin Python + Selenium Kullan



from selenium import webdriver
from selenium.webdriver.common.by import By
import time

# Tarayıcı ayarları
driver = webdriver.Chrome()

# Tüm video linklerinin olduğu bir liste
video_urls = [
"https://platform.com/video1",
"https://platform.com/video2",
# ...
"https://platform.com/video250"
]

for url in video_urls:
driver.get(url)
time.sleep(3) # Sayfa yüklensin

try:
video = driver.find_element(By.TAG_NAME, 'video')
driver.execute_script("arguments[0].play();", video)

duration = driver.execute_script("return arguments[0].duration", video)
print(f"Videonun süresi: {duration} saniye")
time.sleep(duration + 5) # Bitene kadar bekle
except Exception as e:
print("Video bulunamadı:", e)

driver.quit()