Last active
June 26, 2024 01:47
-
-
Save DevelopKim/f346633df84c9e2ddb9f565ffa111a85 to your computer and use it in GitHub Desktop.
유튜브 나중에 볼 영상 일괄 삭제
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
let btns = document.querySelectorAll('#button.style-scope > yt-icon.style-scope.ytd-menu-renderer'); | |
//get three buttons | |
let itemCount = 1; | |
//for counting | |
setInterval(function(){ | |
btns[itemCount].click(); | |
let removeBtn = document.querySelectorAll('#items > ytd-menu-service-item-renderer:nth-child(3) > tp-yt-paper-item')[0] | |
removeBtn.click(); | |
//remove at list | |
itemCount+=1 | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
유튜브의 '좋아요 표시한 동영상' 의 경우 코드 일부만 수정 하면 같은 방식으로 동작 합니다.8번 라인이 삭제 버튼을 지정하는 것인데 '좋아요 표시한 동영상' 에서는 순서가 다릅니다.
기존
nth-child(3)
을nth-child(6)
으로 변경 하면 됩니다.2024-06-24 수정
유튜브 마크업이 변경 되어 nth-child(6) 으로 변경 했는데 다시 원래 대로
nth-child(3)
으로 세번째 메뉴가삭제 버튼으로 변경되었네요.
아래 코드는 변경된 상태 입니다. 그대로 사용하시면 됩니다.
전체 코드 입니다.