Skip to content

Instantly share code, notes, and snippets.

View Om-Thorat's full-sized avatar
🌠

Om Thorat Om-Thorat

🌠
View GitHub Profile
@Om-Thorat
Om-Thorat / CleanWL.js
Created February 2, 2023 08:13
Clean the youtube Watch Later playlist by removing the videos you have watched!
var WList = document.querySelector("#contents").querySelector("#contents").querySelector("#contents").children
console.log(WList.length)
function sleep(ms) {return new Promise(resolve => setTimeout(resolve, ms));}
console.log("Starting...")
removed = [];
async function clean() {
for (let i = 0; i < WList.length; i++) {
const vid = WList[i];
var prog = vid.children[1].querySelector("#container #thumbnail #thumbnail #overlays #progress");
if (prog != null) {