Skip to content

Instantly share code, notes, and snippets.

@derofim
Last active February 3, 2018 14:25
Show Gist options
  • Save derofim/56bc3931119f95e8c8fc1c96d1061a95 to your computer and use it in GitHub Desktop.
Save derofim/56bc3931119f95e8c8fc1c96d1061a95 to your computer and use it in GitHub Desktop.
play all videos
urls=(
"YOUR URL 1"
"YOUR URL 2"
)
for (( i = 0; i < ${#urls[@]}; ++i )); do
# create filename based on url.
filename=`echo ${i}.mp4`
echo "downloading ${urls[i]} to $filename"
curl -s -o "$filename" "${urls[i]}"
done
var result = [];
var x = document.querySelectorAll('.attachment a');
Array.prototype.forEach.call(x, function(elements, index) {
if(typeof x[index] != 'undefined' && x[index]) {
result.push("\""+x[index].href+"\"");
}
});
console.log(result.join("\n "));
var result = [];
var looper = function(data, srcVid, i) {
result.push("\""+srcVid.src+"\"");
if (i+1 >= data.length) {
console.log(result.join("\n "));
return;
}
var y = data[i+1];
if (y) {
y.click();
setTimeout(function(){
looper(data, srcVid, i+1);
}, 1000);
}
}
var x = document.getElementsByClassName("session-item-title");
var srcVid = $(".vjs-tech");
looper(x, srcVid, 0);

For test purposes only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment