Created
March 6, 2024 20:09
-
-
Save yagopajarino/3b8f3b3233ee78363b65781caf114b17 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
/* Extrae curricula del curso de Udemy | |
Ejecutar en la consola de chrome dentro de la pagina de inicio del curso | |
06-03-2024 | |
Creado por Yago Pajariño ([email protected]) | |
*/ | |
let curricula = document.querySelector('div[data-purpose="course-curriculum"]'); | |
let contenedorCurso = curricula.lastElementChild | |
let lis = new Array(...contenedorCurso.querySelectorAll("li")) | |
const extractDataFromLi = (li) =>{ | |
let row = li.querySelector(".ud-block-list-item-content") | |
let title = row.querySelector(".section--item-title--EWIuI").textContent | |
let tiempo = row.querySelector('.section--hidden-on-mobile---ITMr.section--item-content-summary--Aq9em').textContent; | |
return [title, tiempo].join(";") | |
} | |
console.log(lis.map(i => extractDataFromLi(i)).join("\n")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment