Greasy Fork is available in English.

openload

Remove anti-adblock, ads, popups and timer waits, and show direct download link

< Відгуки до openload

Question/comment

§
Опубліковано: 28.05.2019
Edited: 28.05.2019

Another way to detect the stream url

I found another way to get the stream url: When a src tag is set on a media element, that element triggers a "durationchange" event, and that line of code changes the video src attribute:

$('#videooverlay').click();

So instead of parsing the dom to find the div that contains a part of the url, you can just wait for the video src to be changed. To do so you can replace your onready function by that:

function onready(fn){
    if(typeof fn === "function"){
        var timer = setInterval(function(){
          if(typeof jQuery === "function" && jQuery.isReady === true){
               //clear first to prevent repeat on script error inside callback
              clearInterval(timer);
              fn();
          }
        },10);
    }
}

and your timer:

 var streamurl_tmr = setInterval(function(){
     //...
},100);

by:

 $('video.vjs-tech').one('durationchange', function(e){
     //you get the full url
    var streamurl_url = e.target.src;
    $('#realdl a').attr('href', streamurl_url);
    $('#steamcopy').text( streamurl_url );
});
//does all the work
$('#videooverlay').click();
$('div[style*="z-index"]:not(#realdl)').each(function(){this.remove();});
leoncastroАвтор
§
Опубліковано: 31.05.2019

But does not work on links that are not videos.

Опублікувати відповідь

Sign in to post a reply.