Xvideos video direct download

Download videos from xvideos adult site directly without registration

  1. // ==UserScript==
  2. // @name Xvideos video direct download
  3. // @namespace https://greasyfork.org/es/users/758165-AlÉxito
  4. // @include https://www.xvideos.com/*
  5. // @version 0.2
  6. // @author AlExito
  7. // @description Download videos from xvideos adult site directly without registration
  8. // @grant GM_xmlhttpRequest
  9. // @grant GM_download
  10. // @license MIT feel free to modify improve and share
  11. // @icon https://static-cdn77.xvideos-cdn.com/v3/img/skins/default/logo/xv.black.16.png
  12. // ==/UserScript==
  13.  
  14. function star() {
  15. document.querySelector('#xvid').textContent = "Working....";
  16. var url = window.location.href;
  17. GM_xmlhttpRequest({
  18. method: "GET",
  19. url: url,
  20. headers: {
  21. "Content-Type": "application/json"
  22. },
  23. onload: function(response) {
  24. const page = response.responseText.toString();
  25. const urlhigh = page.match(/.+html5player.setVideoUrlHigh.+/g).toString().replace("html5player.setVideoUrlHigh('", "").replace("');", "").replace(/\s/g, "");
  26. navigator.clipboard.writeText(urlhigh);
  27. var title = document.title.replace(" - XVIDEOS.COM", ".mp4");
  28. var arg = { url: urlhigh, name: title, saveAs: false };
  29. GM_download(arg);
  30. document.querySelector('#xvid').textContent = "Donwload";
  31. }
  32. });
  33. };
  34. function Boton2() {
  35. var aBoton2 = document.createElement("div");
  36. var aEtiqueta2 = document.createElement("p");
  37. aBoton2.id = "xvid";
  38. aBoton2.style.position = "absolute";
  39. aBoton2.style.zIndex = "10000";
  40. aBoton2.style.padding = "1px 5px 1px 5px";
  41. aBoton2.style.backgroundColor = "#35374a";
  42. aBoton2.style.width = "auto";
  43. aBoton2.style.cursor = "pointer";
  44. aBoton2.style.bottom = "10px";
  45. aBoton2.style.left = "-0px";
  46. aBoton2.style.display = "contents";
  47. aEtiqueta2.textContent = "Donwload";
  48. aEtiqueta2.style.color = "red";
  49.  
  50. document.querySelector('#video-tabs').appendChild(aBoton2);
  51. aBoton2.appendChild(aEtiqueta2);
  52.  
  53. aBoton2.onclick = function () {
  54. star();
  55. };
  56. }
  57. Boton2();