Created
November 28, 2020 17:13
-
-
Save tvanantwerp/bef370220bbb7c1630fc11928105b3d1 to your computer and use it in GitHub Desktop.
Get name and instructor of course listings on Udemy courses page
This file contains hidden or 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
// for use in console here: https://www.udemy.com/home/my-courses/learning/ | |
// last used successfully on 11/28/2020 | |
let courseObjs = Array.from(document.querySelectorAll('a.card--learning__details')) | |
let theCourses = []; | |
courseObjs.forEach(obj => theCourses.push({ | |
title: obj.querySelector('strong.details__name').textContent, | |
author: obj.querySelector('div.details__instructor').textContent | |
}) | |
) | |
console.table(theCourses); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment