Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. function clickMoreDataBtn(){
  2. var moreDataBtn = document.getElementById("moreDataBtn");
  3. if(moreDataBtn != null && !(moreDataBtn.style.display=="none")){
  4. moreDataBtn.click();
  5. setTimeout(function () {
  6. clickMoreDataBtn();
  7. }, 1000);
  8. }else {
  9. grabVideoList();
  10. }
  11. }
  12.  
  13. function grabVideoList(){
  14. var videoUList = document.getElementsByClassName("videoUList")[0];
  15. var linkList = videoUList.querySelectorAll("span > a");
  16. for(var i = 0; i< linkList.length; i++){
  17. console.log(linkList[i].href);
  18. }
  19. showLinks(linkList);
  20. }
  21.  
  22. function showLinks(linkList){
  23. var outerModalDiv = document.createElement("div");
  24. var innerModalDiv = document.createElement("div");
  25. outerModalDiv.style.display = "block";
  26. outerModalDiv.style.position = "fixed";
  27. outerModalDiv.style.zIndex = "100";
  28. outerModalDiv.style.paddingTop = "100px";
  29. outerModalDiv.style.left = "0";
  30. outerModalDiv.style.top = "0";
  31. outerModalDiv.style.width = "100%";
  32. outerModalDiv.style.height = "100%";
  33. outerModalDiv.style.overflow = "auto";
  34. outerModalDiv.style.backgroundColor = "rgb(0,0,0)";
  35. outerModalDiv.style.backgroundColor = "rgb(0,0,0,0.4)";
  36.  
  37. innerModalDiv.style.backgroundColor = "#fefefe";
  38. innerModalDiv.style.margin = "auto";
  39. innerModalDiv.style.padding = "20px";
  40. innerModalDiv.style.border = "1px solid #888";
  41. innerModalDiv.style.width = "80%";
  42. innerModalDiv.style.color = "black";
  43.  
  44. var instructions1 = document.createElement("p");
  45. var instructions2 = document.createElement("p");
  46. var instructions3 = document.createElement("p");
  47. instructions1.innerHTML = "Save the links to a local textfile (e.g. &quot;C:\\Temp\\dl\\linklist.txt)&quot; and run youtube-dl whith the -a argument and the path to the linklist.";
  48. instructions2.innerHTML = "youtube-dl -a &quot;C:\\Temp\\dl\\linklist.txt&quot;";
  49. instructions3.innerHTML = "Or just use jDownloader with the linklist";
  50. innerModalDiv.appendChild(instructions1);
  51. innerModalDiv.appendChild(instructions2);
  52. innerModalDiv.appendChild(instructions3);
  53.  
  54. for(var i = 0; i < linkList.length; i++){
  55. var p = document.createElement("p");
  56. p.innerHTML = linkList[i].href;
  57. innerModalDiv.appendChild(p);
  58. }
  59. outerModalDiv.appendChild(innerModalDiv);
  60. document.body.appendChild(outerModalDiv);
  61. }
  62.  
  63. clickMoreDataBtn();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement