Last active
June 13, 2023 20:59
-
-
Save bagcivan/31279d0b64c6e5b3716981e45c8a1ab9 to your computer and use it in GitHub Desktop.
Youtube Altyazı alma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function() { | |
document.querySelector("#button-shape > button > yt-touch-feedback-shape > div > div.yt-spec-touch-feedback-shape__fill").click(); | |
}, 2000); | |
setTimeout(function() { | |
document.querySelector("#items > ytd-menu-service-item-renderer:nth-child(5) > tp-yt-paper-item > yt-formatted-string").click(); | |
}, 4000); | |
setTimeout(function() { | |
let elements = document.querySelectorAll('yt-formatted-string.segment-text'); | |
let textArray = []; | |
elements.forEach(function(element) { | |
textArray.push(element.textContent); | |
}); | |
let finalText = textArray.join(", "); | |
console.log(finalText); | |
}, 6000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
javascript ile youtube sayfasında önce 3 noktaya daha sonra da transcripti göster butonuna ardından oluşturulan metni alıp birleştirir ve sonucu konsola yazar.