Skip to content

Instantly share code, notes, and snippets.

@vineethvijayan
Last active July 28, 2021 16:40
Show Gist options
  • Save vineethvijayan/1510ec927335d9d9b6afd8597eb9fd23 to your computer and use it in GitHub Desktop.
Save vineethvijayan/1510ec927335d9d9b6afd8597eb9fd23 to your computer and use it in GitHub Desktop.
loop through the udemy elements
// loop through the udemy elements
var wholeList = document.getElementsByClassName('card--learning__details')
for (let item = 0; item < wholeList.length; item++) {
const element = wholeList[item];
const courseLink = element.href
const courseName = element.children[0].children[0].innerText
console.log(courseName, '###' , courseLink)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment