-
-
Save hadees/5b19d719bb1e9de1df74885c2c9e12db to your computer and use it in GitHub Desktop.
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
// Run on https://www.youtube.com/user/foobar/playlists?view=1&shelf_id=0&sort=dd | |
function getParents(el, parentSelector /* optional */) { | |
// If no parentSelector defined will bubble up all the way to *document* | |
if (parentSelector === undefined) { | |
parentSelector = document; | |
} | |
var parents = []; | |
var p = el.parentNode; | |
while (p !== parentSelector) { | |
var o = p; | |
parents.push(o); | |
p = o.parentNode; | |
} | |
parents.push(parentSelector); // Push that parentSelector you wanted to stop at | |
return parents; | |
} | |
var s = document.createElement('script'); | |
s.type = 'text/javascript'; | |
s.src = 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'; | |
document.head.appendChild(s); | |
_.each(document.querySelectorAll('[title*="Bumpers"][id="video-title"]'), function(e) { console.log(getParents(e)[1].href + ' # ' + e.title) }) |
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
youtube-dl --download-archive downloaded.txt -i -o "%(playlist_title)s/%(title)s - %(uploader)s - %(upload_date)s - (%(duration)ss) [%(resolution)s].%(ext)s" -f bestvideo[ext=mp4]+bestaudio --batch-file=playlists.txt | |
http_proxy="91.194.42.51:80" youtube-dl --download-archive downloaded.txt -i -o "%(playlist_title)s/%(title)s - %(uploader)s - %(upload_date)s - (%(duration)ss) [%(resolution)s].%(ext)s" -f bestvideo[ext=mp4]+bestaudio --batch-file=playlists.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment