Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


CPA-20

24 Jul 2022 »

top invest

curso t2

Curso Topinvest CPA-20

Gen toc

let wrapper = document.querySelector('[data-controller=reorderable]')
var html = []
html.push(`
<html>
<head>
  <meta charset="UTF-8">
</head>
<style>a {color: blue;}</style>
<body>
`)
html.push('<div style="column-count:3;">')
html.push(`<ul>`)
wrapper.children.forEach(d => {
    let dtitle = d.querySelector('h2').querySelectorAll('span')[1].innerText
    console.log(dtitle)
    html.push(`<li>`)
    html.push(`${dtitle}`)
    html.push(`<ul>`)
    
    d.querySelectorAll('.text-slate-700').forEach(d2 => {
        let vidtitle = d2.innerText.trim()
        let dur = ""
        try{
            dur = d2.parentElement.querySelector('.text-slate-400').innerText
            dur = dur.trim()
        }catch{}
        
        console.log(vidtitle, dur)
        html.push(`<li>[ ] ${vidtitle} ${dur}</li>`)
    })
    html.push(`</ul>`)
    html.push(`</li>`)
    console.log('==============')
})
html.push(`</ul>`)
html.push(`</body></html>`)

html = html.join("")
//window.open("data:text/html,"+escape(html), "_blank")
console.log("data:text/html,"+encodeURIComponent(html))