reRedirector

Redirect streaming links directly to source

  1. // ==UserScript==
  2. // @name reRedirector
  3. // @namespace https://tribbe.de
  4. // @version 1.0.0
  5. // @description Redirect streaming links directly to source
  6. // @author Tribbe (rePublic Studios)
  7. // @license MIT
  8. //
  9. // @include *://*voe*
  10. //
  11. // @include *streamtape.*/get_video?*
  12. // @include *streamtape.*/e/*
  13. // @include *strcloud.*
  14. // @include *tapecontent.*
  15. // @include *strtape.*
  16. // @include *strtpe.*
  17. // @include *stape.*
  18. // @include *adblockstrtech.*
  19. //
  20. // @include *vidoza.net*
  21. //
  22. // @include *://streamz.ws*
  23. // @include *://streamzz.to*
  24. //
  25. // @include *://evoload*
  26. // ==/UserScript==
  27.  
  28. window.addEventListener("load", doSearch);
  29.  
  30. async function doSearch() {
  31. var checkIsVideoNode = await document.querySelectorAll(
  32. "body>video[data-better-html5-video-type]>source[type*='video/mp4'][src]"
  33. );
  34. if (checkIsVideoNode == null || checkIsVideoNode.length == 0) {
  35. var content = document.body.textContent;
  36. var video = null;
  37. var videoNode = null;
  38.  
  39. //VOE
  40. if (document.location.hostname.includes("voe")) {
  41. var mp4finder = null;
  42. mp4finder = content.match(/(https?.*?\.mp4)/);
  43. if (mp4finder != null) video = mp4finder[0];
  44.  
  45. if (video == null) {
  46. mp4finder = content.match(/sources\[\"mp4\"\] = .*?\(\[(.*?)]\);/);
  47. if (mp4finder != null && mp4finder.length == 2) {
  48. var mp4array = mp4finder[1].replaceAll("'", "").split(",");
  49. var p01 = mp4array.join("").split("").reverse().join("");
  50. video = atob(p01);
  51. }
  52. }
  53. }
  54.  
  55. //Streamtape
  56. if (
  57. document.location.hostname.includes("streamtape") ||
  58. document.location.hostname.includes("str") ||
  59. document.location.hostname.includes("tapecontent") ||
  60. document.location.hostname.includes("stape") ||
  61. document.location.hostname.includes("adblockstrtech")
  62. ) {
  63. videoNode = await document.querySelectorAll("div[id*='link']");
  64. var bFound = false;
  65. for (const link of Object.values(videoNode)) {
  66. var url = "https:" + link.textContent;
  67. if (
  68. !bFound &&
  69. url.includes(document.location.hostname + "/get_video?id=")
  70. ) {
  71. bFound = true;
  72. video = url;
  73. }
  74. }
  75. }
  76.  
  77. //Vidoza
  78. if (document.location.hostname.includes("vidoza.net")) {
  79. videoNode = await document.querySelectorAll(
  80. "video[id*='player_html5_api'][class*='vjs-tech']>source[type*='video/mp4'][src]"
  81. );
  82. if (videoNode.length > 0) {
  83. video = videoNode[0].getAttribute("src");
  84. }
  85. }
  86.  
  87. //StreamZ
  88. if (
  89. document.location.hostname.includes("streamz.ws") ||
  90. document.location.hostname.includes("streamzz.to")
  91. ) {
  92. videoNode = await document.querySelectorAll(
  93. "video[id*='video_1_html5_api']"
  94. );
  95. if (videoNode.length > 0) {
  96. video = videoNode[0].getAttribute("src");
  97. }
  98. }
  99.  
  100. //Evoload
  101. if (document.location.hostname.includes("evoload")) {
  102. videoNode = await document.querySelectorAll(
  103. "video[id*='EvoVid_html5_api']"
  104. );
  105. if (videoNode.length > 0) {
  106. video = videoNode[0].getAttribute("src");
  107. }
  108. }
  109.  
  110. if (video != null) window.location.href = video;
  111. else {
  112. await new Promise((resolve) => setTimeout(resolve, 500));
  113. await doSearch();
  114. }
  115. return;
  116. }
  117.  
  118. //disable autoplay
  119. checkIsVideoNode[0].parentNode.autoplay = false;
  120. }