Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

258
Vistas
A userscript to remove the first X videos from a playlist on youtube?

I have a need to remove the first 1272 videos from my Liked Videos playlist. I've also found this script, which can delete videos with specific names from that playlist.

// ==UserScript==
// @name         Youtube Deleted/Private video unliker/remover
// @namespace    whatever
// @version      1
// @description  removes videos named [Private video] or [Deleted video] if they have no timestamp from playlists you edit, including your Liked videos list.
// @author       <nazgand@gmail.com>
// @match        https://www.youtube.com/playlist?list=*
// @grant        none
// @homepage     https://github.com/nazgand/userscripts
// ==/UserScript==


function trydelete() {
    const badVideo=document.querySelector('tr.pl-video[data-title="[Private video]"],tr.pl-video[data-title="[Deleted video]"]');
    if (badVideo !== null) {
        if (badVideo.querySelector('div.timestamp')===null) {
            badVideo.querySelector('button.pl-video-edit-remove-liked-video,button.pl-video-edit-remove').click();
            setTimeout(trydelete, 200);
        } else {
            //The scripter was too lazy to deal with this unlikely error.
        }
    } else {
        tryload();
    }
}
function tryload() {
    const btnLoadMore = document.querySelector('button.load-more-button');
    if (btnLoadMore !== null) {
        btnLoadMore.click();
        setTimeout(trydelete, 900);
    }
}
trydelete();

I'm assuming it's easy enough to modify to just remove the first 1272 videos. Problem is, I know next to nothing about userscripts, and don't know where to learn that, which is why I'm posting this question. How can I modify the script to just delete the first 1272 videos, instead of deleting the videos with specific names?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda