real-debrid

Easy way to debrid link with real-debrid

node-real-debrid

An easy way to debrid and download file from real-debrid using node.js

npm install real-debrid
var realdebrid = require('real-debrid');
 
// DEBRID A LINK 
 
realdebrid.debrid('user', 'mdp', 'http://link', function(responseerror){
    if(response){
        console.log('Response: '+ response.link);
 
        //DOWNLOAD 
 
        realdebrid.download(response.link, 'path/to/download/' + response.name, function(response){
 
            if (response.progress){
                console.log('progress: ' + response.progress.percent + "% Speed: " + response.progress.mbps + "Mbps " + response.progress.bytesWriting + "/" + response.progress.totalSize);
            }else if (response === 'end'){
                console.log('File downloaded.')
            }else{
                console.log('Error: ' + response);
            }
        });
 
    }else{
        console.log('Error: ' + error);
    }
});