Skip to content

React Native EU Conf 20

LeoTM edited this page Apr 18, 2023 · 12 revisions

Getting the vid names

for (const item of document.getElementsByTagName('h4')) { console.log(item.children[1].innerHTML) }

Getting the links

for (const item of document.querySelectorAll('[id=playlist-items]')) { console.log(item.children[0].href) }
// or firstElementChild

Putting 'em all together (old skool Vanilla JS awakening 🀯)

for (const item of document.querySelectorAll('[id=playlist-items]')) { console.log(`[${item.firstElementChild.href}](${item.firstElementChild.firstElementChild.children[2].children[1].children[1].innerHTML})`) }