Created
November 22, 2019 10:04
-
-
Save julienreszka/cec9673c0c4950ac369bd02ece4004df to your computer and use it in GitHub Desktop.
This file contains 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
var playlist = [] | |
var i = 4; | |
listSize = document | |
.querySelectorAll( | |
'.ytd-playlist-video-list-renderer' | |
).length | |
for( | |
i; | |
i<listSize-2; | |
i++ | |
) { | |
// console.log( | |
// document | |
// .querySelectorAll( | |
// '.ytd-playlist-video-list-renderer' | |
// )[i] | |
// ) | |
var playlistVideoObject = {} | |
playlistVideoObject | |
.href = document | |
.querySelectorAll( | |
'.ytd-playlist-video-list-renderer' | |
)[i] | |
.querySelector( | |
'a' | |
) | |
.getAttribute( | |
'href' | |
) | |
playlistVideoObject | |
.channel = document | |
.querySelectorAll( | |
'.ytd-playlist-video-list-renderer' | |
)[i] | |
.querySelectorAll( | |
'.style-scope yt-formatted-string' | |
)[1] | |
.textContent | |
playlist | |
.push( | |
playlistVideoObject | |
) | |
} | |
console | |
.log( | |
playlist | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment