Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clickMoreDataBtn(){
- var moreDataBtn = document.getElementById("moreDataBtn");
- if(moreDataBtn != null && !(moreDataBtn.style.display=="none")){
- moreDataBtn.click();
- setTimeout(function () {
- clickMoreDataBtn();
- }, 1000);
- }else {
- grabVideoList();
- }
- }
- function grabVideoList(){
- var videoUList = document.getElementsByClassName("videoUList")[0];
- var linkList = videoUList.querySelectorAll("span > a");
- for(var i = 0; i< linkList.length; i++){
- console.log(linkList[i].href);
- }
- showLinks(linkList);
- }
- function showLinks(linkList){
- var outerModalDiv = document.createElement("div");
- var innerModalDiv = document.createElement("div");
- outerModalDiv.style.display = "block";
- outerModalDiv.style.position = "fixed";
- outerModalDiv.style.zIndex = "100";
- outerModalDiv.style.paddingTop = "100px";
- outerModalDiv.style.left = "0";
- outerModalDiv.style.top = "0";
- outerModalDiv.style.width = "100%";
- outerModalDiv.style.height = "100%";
- outerModalDiv.style.overflow = "auto";
- outerModalDiv.style.backgroundColor = "rgb(0,0,0)";
- outerModalDiv.style.backgroundColor = "rgb(0,0,0,0.4)";
- innerModalDiv.style.backgroundColor = "#fefefe";
- innerModalDiv.style.margin = "auto";
- innerModalDiv.style.padding = "20px";
- innerModalDiv.style.border = "1px solid #888";
- innerModalDiv.style.width = "80%";
- innerModalDiv.style.color = "black";
- var instructions1 = document.createElement("p");
- var instructions2 = document.createElement("p");
- var instructions3 = document.createElement("p");
- instructions1.innerHTML = "Save the links to a local textfile (e.g. "C:\\Temp\\dl\\linklist.txt)" and run youtube-dl whith the -a argument and the path to the linklist.";
- instructions2.innerHTML = "youtube-dl -a "C:\\Temp\\dl\\linklist.txt"";
- instructions3.innerHTML = "Or just use jDownloader with the linklist";
- innerModalDiv.appendChild(instructions1);
- innerModalDiv.appendChild(instructions2);
- innerModalDiv.appendChild(instructions3);
- for(var i = 0; i < linkList.length; i++){
- var p = document.createElement("p");
- p.innerHTML = linkList[i].href;
- innerModalDiv.appendChild(p);
- }
- outerModalDiv.appendChild(innerModalDiv);
- document.body.appendChild(outerModalDiv);
- }
- clickMoreDataBtn();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement