Skip to content

Instantly share code, notes, and snippets.

@sandeepthukral
Created January 31, 2021 20:18
Show Gist options
  • Save sandeepthukral/a8d6ec3826dc8730e58a953833bec28f to your computer and use it in GitHub Desktop.
Save sandeepthukral/a8d6ec3826dc8730e58a953833bec28f to your computer and use it in GitHub Desktop.
Extract Udemy course details

How to use

  • Open any udemy course page
  • Expacd all sections manually. To make life easy, start from the lowermost one. This will take maybe 30 seconds. Now that I think of it, this can also be automated
  • Paste the scrit in the console and execute. You will get the course section heads and details.
allSections = $$('.panel--panel--3NYBX')
for (let section of allSections){
sectionC = section.children
for (index in sectionC) {
if (index==1){
console.log(sectionC[index].children[0].innerText)
}
if (index==2){
children = sectionC[index].children[0].children[0].children
for (child of children) {
console.log(child.innerText)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment